/* ─────────────────────────────────────────────────────────────────────
 * lyra-bt-video-trio.css
 *
 * Styles for three video blocks:
 *   - video_lite        → .lyra-bt-vt.lyra-bt-vt--lite
 *   - video_conversion  → .lyra-bt-vt.lyra-bt-vt--conversion
 *   - video_hero_split  → .lyra-bt-vt.lyra-bt-vt--hero-split
 *
 * Shared core (.lyra-bt-vt) handles aspect ratio + container + colors via
 * CSS variables. Per-variant rules layer the variant-specific UI on
 * top (timed CTAs, chapter strip, sticky mini-player, hero-split layout).
 *
 * NOTE: the modal-form styles (lyra-bt-lib__modal-*) come from
 * lyra-bt-link-in-bio.css — both Conversion-block modal-CTAs and the
 * link-in-bio blocks render the same modal markup, so the modal styles
 * are owned by lyra-bt-link-in-bio.css and shared. Don't duplicate them
 * here.
 * ───────────────────────────────────────────────────────────────────── */

.lyra-bt-vt {
    --lyra-bt-vt-aspect: 16 / 9;
    --lyra-bt-vt-radius: 14px;
    --lyra-bt-vt-pad-v: 24px;
    --lyra-bt-vt-pad-h: 0px;
    --lyra-bt-vt-accent: #10b981;
    --lyra-bt-vt-bg: transparent;
    --lyra-bt-vt-text: #0f172a;
    --lyra-bt-vt-muted: #64748b;
    box-sizing: border-box;
    padding: var(--lyra-bt-vt-pad-v) var(--lyra-bt-vt-pad-h);
    background: var(--lyra-bt-vt-bg);
    color: var(--lyra-bt-vt-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.5;
}
.lyra-bt-vt *, .lyra-bt-vt *::before, .lyra-bt-vt *::after { box-sizing: border-box; }
.lyra-bt-vt--bounded { max-width: var(--lyra-bt-vt-max-w, 100%); margin-left: auto; margin-right: auto; }

.lyra-bt-vt--empty {
    padding: 12px 16px;
    background: #fef3c7;
    color: #92400e;
    border: 1px dashed #d97706;
    border-radius: 8px;
    text-align: left;
    font-size: 13px;
}

.lyra-bt-vt__heading {
    margin: 0 0 14px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.012em;
    line-height: 1.2;
    color: var(--lyra-bt-vt-text);
}

.lyra-bt-vt__caption {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--lyra-bt-vt-muted);
}

/* ═════════════════════════════════════════════════════════════════════
 * Lite player + Conversion player wrapper — shared aspect-ratio frame
 * ═════════════════════════════════════════════════════════════════════ */

/* The player frame uses modern CSS aspect-ratio (96%+ browser support).
 * The fallback for old browsers is the padding-bottom hack inside a
 * @supports-not block — old Safari (< 15) needs it. */
.lyra-bt-vt__player,
.lyra-bt-vt__player-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: var(--lyra-bt-vt-aspect);
    background: #000;
    border-radius: var(--lyra-bt-vt-radius);
    overflow: hidden;
}
@supports not (aspect-ratio: 16 / 9) {
    .lyra-bt-vt__player,
    .lyra-bt-vt__player-wrap {
        aspect-ratio: auto;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 fallback only — covers most cases */
    }
    .lyra-bt-vt--aspect-4x3  .lyra-bt-vt__player,
    .lyra-bt-vt--aspect-4x3  .lyra-bt-vt__player-wrap { padding-bottom: 75%; }
    .lyra-bt-vt--aspect-21x9 .lyra-bt-vt__player,
    .lyra-bt-vt--aspect-21x9 .lyra-bt-vt__player-wrap { padding-bottom: 42.86%; }
    .lyra-bt-vt--aspect-1x1  .lyra-bt-vt__player,
    .lyra-bt-vt--aspect-1x1  .lyra-bt-vt__player-wrap { padding-bottom: 100%; }
    .lyra-bt-vt--aspect-9x16 .lyra-bt-vt__player,
    .lyra-bt-vt--aspect-9x16 .lyra-bt-vt__player-wrap { padding-bottom: 177.78%; }
}

/* Native <video> + <iframe> fill the player frame */
.lyra-bt-vt__video,
.lyra-bt-vt__iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* MP4 player wrapper (Lite mode) */
.lyra-bt-vt__player--mp4 { background: #000; }
.lyra-bt-vt__player--mp4 .lyra-bt-vt__video { background: #000; }

/* Facade poster image (YouTube / Vimeo Lite mode) */
.lyra-bt-vt__player--facade {
    cursor: pointer;
}
.lyra-bt-vt__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.18s ease;
}
.lyra-bt-vt__poster--placeholder {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}
.lyra-bt-vt__player--facade:hover .lyra-bt-vt__poster {
    filter: brightness(0.85);
}

/* Centered play button overlay */
.lyra-bt-vt__play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: transparent;
    border: 0;
    pointer-events: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.lyra-bt-vt__play-btn svg { width: 100%; height: 100%; display: block; }
.lyra-bt-vt__play-btn svg path:first-child { transition: fill 0.2s ease, opacity 0.2s ease; }
.lyra-bt-vt__player--facade:hover .lyra-bt-vt__play-btn {
    transform: translate(-50%, -50%) scale(1.06);
}
.lyra-bt-vt__player--vimeo .lyra-bt-vt__play-btn svg path:first-child { fill: #1ab7ea; }

.lyra-bt-vt__player--facade:focus-visible {
    outline: 3px solid var(--lyra-bt-vt-accent);
    outline-offset: 3px;
}

.lyra-bt-vt__player--invalid {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: #94a3b8;
    font-size: 13px;
    padding: 16px;
}

/* ═════════════════════════════════════════════════════════════════════
 * Conversion player — chapter strip + timed CTAs + sticky mini-player
 * ═════════════════════════════════════════════════════════════════════ */

.lyra-bt-vt--conversion .lyra-bt-vt__player-wrap {
    margin-bottom: 10px;
}

/* Timed CTA overlay layer — sits over the bottom-left of the player */
.lyra-bt-vt__timed-ctas {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    pointer-events: none; /* children re-enable when visible */
}
.lyra-bt-vt__timed-cta {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--lyra-bt-vt-accent);
    color: #fff;
    border: 0;
    font-size: 14.5px;
    font-weight: 700;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.25s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    font-family: inherit;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px);
}
.lyra-bt-vt__timed-cta.is-visible {
    display: inline-flex;
    opacity: 1;
    transform: translateY(0);
    animation: lyra-bt-vt-cta-pop 0.28s ease both;
}
.lyra-bt-vt__timed-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.42);
}
.lyra-bt-vt__timed-cta:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.lyra-bt-vt__timed-cta--outline {
    background: rgba(15, 23, 42, 0.78);
    border: 1.5px solid var(--lyra-bt-vt-accent);
    color: #fff;
    backdrop-filter: blur(2px);
}
.lyra-bt-vt__timed-cta svg { width: 14px; height: 14px; }

@keyframes lyra-bt-vt-cta-pop {
    0%   { opacity: 0; transform: translateY(8px) scale(0.96); }
    60%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chapter strip — clickable dots below the player */
.lyra-bt-vt__chapters {
    position: relative;
    margin: 6px 4px 0;
    height: 26px;
}
.lyra-bt-vt__chapters-track {
    position: absolute;
    top: 11px;
    left: 0;
    right: 0;
    height: 4px;
    background: color-mix(in srgb, var(--lyra-bt-vt-text) 12%, transparent);
    border-radius: 2px;
}
.lyra-bt-vt__chapters-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--lyra-bt-vt-accent);
    border-radius: 2px;
    transition: width 0.18s linear;
}
.lyra-bt-vt__chapter-dot {
    position: absolute;
    top: 8px;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    padding: 0;
    border: 2px solid var(--lyra-bt-vt-accent);
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 2;
}
.lyra-bt-vt__chapter-dot:hover,
.lyra-bt-vt__chapter-dot:focus-visible {
    background: var(--lyra-bt-vt-accent);
    transform: scale(1.4);
}
.lyra-bt-vt__chapter-dot:focus-visible {
    outline: 2px solid var(--lyra-bt-vt-accent);
    outline-offset: 3px;
}
.lyra-bt-vt__chapter-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 4px 8px;
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.lyra-bt-vt__chapter-dot:hover .lyra-bt-vt__chapter-tooltip,
.lyra-bt-vt__chapter-dot:focus-visible .lyra-bt-vt__chapter-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═════════════════════════════════════════════════════════════════════
 * Sticky mini-player (Conversion only)
 * ═════════════════════════════════════════════════════════════════════ */

.lyra-bt-vt__sticky {
    position: fixed;
    z-index: 9998;
    width: var(--lyra-bt-vt-sticky-w, 320px);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
    transform: translateY(8px) scale(0.96);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}
.lyra-bt-vt__sticky.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.lyra-bt-vt__sticky.is-dismissed {
    display: none !important;
}
.lyra-bt-vt--sticky-bottom-right .lyra-bt-vt__sticky { bottom: 16px; right: 16px; }
.lyra-bt-vt--sticky-bottom-left  .lyra-bt-vt__sticky { bottom: 16px; left:  16px; }
.lyra-bt-vt--sticky-top-right    .lyra-bt-vt__sticky { top:    16px; right: 16px; }
.lyra-bt-vt--sticky-top-left     .lyra-bt-vt__sticky { top:    16px; left:  16px; }

.lyra-bt-vt__sticky-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.lyra-bt-vt__sticky-close:hover { background: rgba(0, 0, 0, 0.92); }
.lyra-bt-vt__sticky-close svg { width: 14px; height: 14px; }
.lyra-bt-vt__sticky iframe,
.lyra-bt-vt__sticky video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

@media (max-width: 540px) {
    /* On phones the sticky fills the bottom edge full-width (less awkward) */
    .lyra-bt-vt__sticky {
        width: calc(100vw - 24px) !important;
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        top: auto !important;
    }
}

/* ═════════════════════════════════════════════════════════════════════
 * Hero-Split layout
 * ═════════════════════════════════════════════════════════════════════ */

.lyra-bt-vt--hero-split {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
    position: relative;
    border-radius: var(--lyra-bt-vt-radius);
    overflow: hidden;
}
.lyra-bt-vt--hero-split.lyra-bt-vt--side-right {
    flex-direction: row-reverse;
}
.lyra-bt-vt__hero-split-video,
.lyra-bt-vt__hero-split-text {
    flex: 1 1 380px;
    min-width: 0;
}
.lyra-bt-vt__hero-split-video {
    aspect-ratio: var(--lyra-bt-vt-aspect);
    position: relative;
    background: #000;
    border-radius: var(--lyra-bt-vt-radius);
    overflow: hidden;
}
.lyra-bt-vt__hero-split-video .lyra-bt-vt__player {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    width: 100%;
    height: 100%;
}

/* Background-video mode — video fills the entire block as backdrop */
.lyra-bt-vt--bg-video {
    position: relative;
    padding: 0;
    min-height: 460px;
    background: #0f172a;
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-video {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    flex: 1;
    border-radius: 0;
    z-index: 0;
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-text {
    position: relative;
    z-index: 1;
    flex: 1 1 100%;
    padding: 80px 48px;
    color: #fff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 60%, rgba(15, 23, 42, 0.2) 100%);
    max-width: 720px;
}
.lyra-bt-vt--bg-video.lyra-bt-vt--side-right .lyra-bt-vt__hero-split-text {
    background: linear-gradient(270deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 60%, rgba(15, 23, 42, 0.2) 100%);
    margin-left: auto;
}
.lyra-bt-vt__hero-split-bg-video,
.lyra-bt-vt__hero-split-bg-iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: center;
    border: 0;
    pointer-events: none;
}
.lyra-bt-vt__hero-split-bg-iframe {
    /* YouTube/Vimeo embeds aren't actually video element so they need
     * an oversized frame to ensure they cover the panel without
     * showing letterbox bars. */
    width: 200%;
    height: 200%;
}

/* Text panel typography */
.lyra-bt-vt__hero-split-eyebrow {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--lyra-bt-vt-accent);
    margin-bottom: 14px;
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-eyebrow { color: var(--lyra-bt-vt-accent); }
.lyra-bt-vt__hero-split-heading {
    margin: 0 0 16px;
    font-size: 38px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.018em;
    color: var(--lyra-bt-vt-text);
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-heading { color: #fff; }
.lyra-bt-vt__hero-split-value-prop {
    margin: 0 0 22px;
    font-size: 16.5px;
    line-height: 1.55;
    color: var(--lyra-bt-vt-muted);
    max-width: 50ch;
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-value-prop { color: rgba(255, 255, 255, 0.85); }

.lyra-bt-vt__hero-split-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: var(--lyra-bt-vt-accent);
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.lyra-bt-vt__hero-split-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    filter: brightness(1.04);
    color: #fff;
}
.lyra-bt-vt__hero-split-cta:focus-visible {
    outline: 2px solid var(--lyra-bt-vt-accent);
    outline-offset: 3px;
}
.lyra-bt-vt__hero-split-cta--outline {
    background: transparent;
    border: 1.5px solid var(--lyra-bt-vt-accent);
    color: var(--lyra-bt-vt-accent);
}
.lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-cta--outline {
    border-color: #fff;
    color: #fff;
}
.lyra-bt-vt__hero-split-cta svg { width: 14px; height: 14px; }

/* ═════════════════════════════════════════════════════════════════════
 * Responsive + reduced motion
 * ═════════════════════════════════════════════════════════════════════ */

@media (max-width: 760px) {
    .lyra-bt-vt--hero-split { gap: 28px; }
    .lyra-bt-vt--hero-split.lyra-bt-vt--side-right { flex-direction: column; }
    .lyra-bt-vt--hero-split:not(.lyra-bt-vt--side-right) { flex-direction: column; }
    .lyra-bt-vt__hero-split-video,
    .lyra-bt-vt__hero-split-text { flex-basis: 100%; }
    .lyra-bt-vt__hero-split-heading { font-size: 30px; }
    .lyra-bt-vt--bg-video { min-height: 420px; }
    .lyra-bt-vt--bg-video .lyra-bt-vt__hero-split-text { padding: 56px 28px; }
    .lyra-bt-vt__timed-ctas { left: 10px; bottom: 10px; }
    .lyra-bt-vt__timed-cta { padding: 9px 13px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .lyra-bt-vt *,
    .lyra-bt-vt *::before,
    .lyra-bt-vt *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    /* Background video keeps playing — that's a content decision, not
     * motion-reduction. Admin who wants to respect reduced-motion fully
     * can disable bg_video_mode. */
}
