/*
Component: LVD Video Modal
Version: 2.0.0
Author: Live Design
*/

/* Overlay — flex centering (no magic left:calc numbers). Opened via the
   .lvd-is-open class toggled in lvd-video-modal.js. */
.lvd-cm-video-modal                 {display:none; position:fixed; inset:0; z-index:9999; padding:64px 8px 40px; background-color:rgba(0,0,0,0.4); overflow-y:auto;}
.lvd-cm-video-modal.lvd-is-open     {display:flex; align-items:flex-start; justify-content:center;}

/* Content */
.lvd-cm-video-modal-content         {position:relative; width:100%; max-width:1024px; padding:40px 8px 8px; border-radius:var(--lvd-rounded-md); background-color:var(--lvd-color-white); animation:lvd-video-zoom 0.35s ease 1;}
@keyframes lvd-video-zoom           {0% {transform:scale(0.92); opacity:0;} 100% {transform:scale(1); opacity:1;}}

/* The dialog takes focus on open (see lvd-video-modal.js) so that no control is
   pre-highlighted. It is a container, not a control, so it draws no ring of its own —
   the first Tab moves to the close button, which rings normally. */
.lvd-cm-video-modal:focus,
.lvd-cm-video-modal:focus-visible {outline:none;}

/* Close button (SVG mask) */
.lvd-cm-video-modal-close  {position:absolute; top:10px; right:10px;}

/* Video — intrinsic ratio via padding-bottom (bulletproof, no aspect-ratio dependency).
   16:9 landscape by default; iframe absolutely fills the wrapper. */
.lvd-cm-video-modal .lvd-video        {position:relative; width:100%; height:0; padding-bottom:56.25%; border-radius:var(--lvd-rounded); overflow:hidden;}
.lvd-cm-video-modal .lvd-video iframe {position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:var(--lvd-rounded);}

/* Portrait (Shorts/Reels 9:16) — narrower content, taller ratio */
.lvd-cm-video-modal.lvd-is-short-video .lvd-cm-video-modal-content {max-width:400px;}
.lvd-cm-video-modal.lvd-is-short-video .lvd-video                  {padding-bottom:177.78%;}

/* Bm */
@media (max-width:767px) {
    .lvd-cm-video-modal             {padding:64px 2px 8px; background:radial-gradient(circle at center, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.98) 100%);}
    .lvd-cm-video-modal-content     {padding:40px 2px 2px; background-color:var(--lvd-color-black);}
    .lvd-cm-video-modal-content     {--lvd-cc-close: var(--lvd-color-white);}
    .lvd-cm-video-modal .lvd-video,
    .lvd-cm-video-modal .lvd-video iframe {border-radius:var(--lvd-rounded-md);}
    .lvd-cm-video-modal.lvd-is-short-video {padding-top:8px;}
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .lvd-cm-video-modal-content     {animation:none;}
}
