/**
 * Hello Home — shared video modal.
 *
 * One modal serves every widget in the plugin. Built once by hello-modal.js and
 * appended to <body>; any element carrying .hello-modal-trigger opens it.
 *
 * Replaces the two hand-rolled lightboxes this plugin family used to ship
 * (look-inside's .hello-li-modal and hello-video-modal's .hvm-overlay).
 */

.hello-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.hello-modal.is-open {
  display: flex;
}
.hello-modal.is-visible {
  opacity: 1;
}

.hello-modal__dialog {
  position: relative;
  width: min(1100px, 100%);
  background: #000;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.2s ease;
}
.hello-modal.is-visible .hello-modal__dialog {
  transform: scale(1);
}

/**
 * Full 16:9 box. Vimeo collapses its control bar (mute/unmute, fullscreen) to a
 * bare arrow in a small player, so the box is kept large deliberately.
 */
.hello-modal__body {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
}
@supports not (aspect-ratio: 16 / 9) {
  .hello-modal__body { height: 0; padding-bottom: 56.25%; }
}
.hello-modal__body iframe,
.hello-modal__body video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hello-modal__close {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: -44px;
  right: -8px;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.hello-modal__close:hover,
.hello-modal__close:focus-visible {
  opacity: 1;
  outline: none;
}
.hello-modal__close::before,
.hello-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}
.hello-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.hello-modal__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

@media (max-width: 767px) {
  .hello-modal {
    padding: 12px;
  }
  .hello-modal__close {
    top: -46px;
    right: 0;
  }
}

/* Locked on <html> as well as <body>: iOS Safari ignores overflow on body alone. */
html.hello-modal-open,
html.hello-modal-open body {
  overflow: hidden;
}
