/*
 * Parabilis video modal
 * ---------------------
 * Lightweight <dialog>-based player for the FMC "Watch a film" CTA
 * (and any future video CTA). Single shared modal injected once in
 * wp_footer; triggers are matched via [data-video-modal-trigger]
 * (declarative) or by visible text "Watch a film" (auto-bound for
 * Salient [button] shortcodes whose output we don't author directly).
 *
 * Authored 2026-05-27 when Parabilis shipped the lender-ready video
 * file (Parabilis Lender Ready WHTLGO 5_12_26.mp4 → 1080p web copy
 * on s3://parabilis-assets.cloudorpheus.com/videos/lender-ready/).
 */

.parabilis-video-modal {
  width: min(1200px, 92vw);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: #000;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  color: #fff;
}

.parabilis-video-modal::backdrop {
  background: rgba(8, 12, 22, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.parabilis-video-modal[open] {
  display: flex;
  flex-direction: column;
  position: relative;
}

.parabilis-video-modal__video {
  width: 100%;
  height: auto;
  max-height: 92vh;
  display: block;
  background: #000;
  outline: 0;
}

.parabilis-video-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease, transform 0.15s ease;
  padding: 0;
  line-height: 0;
}

.parabilis-video-modal__close:hover,
.parabilis-video-modal__close:focus-visible {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.05);
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

.parabilis-video-modal__close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.parabilis-video-modal__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.parabilis-video-modal a {
  color: #fff;
  text-decoration: underline;
}

body.parabilis-video-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .parabilis-video-modal {
    width: 100vw;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .parabilis-video-modal__video {
    max-height: 100vh;
  }

  .parabilis-video-modal__close {
    top: 8px;
    right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parabilis-video-modal__close {
    transition: none;
  }
}
