/* ==========================================================================
   SCORE Live Takeover  v1.0
   Full-viewport livestream hero ("LA Times style") - drop-in include
   M:\score-international.com\inc\live-takeover\live-takeover.css
   ========================================================================== */

.lt-takeover {
    --lt-h: 100vh;
    --lt-red: #cc0000;
    --lt-font: 'Rajdhani', 'Helvetica Neue', Arial, sans-serif;
    --lt-font-display: 'Orbitron', 'Rajdhani', Arial, sans-serif;
    position: relative;
    width: 100%;
    height: var(--lt-h);
    background: #000;
    overflow: hidden;
    z-index: 1;
    isolation: isolate;
}

/* Collapsed = stream offline and hideOffline enabled */
.lt-takeover.lt-hidden { display: none !important; }

/* ---------- media layer ---------- */
.lt-media {
    position: absolute;
    inset: 0;
    background: #000 center/cover no-repeat;
}
.lt-media video,
.lt-media img.lt-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lt-media img.lt-poster {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: opacity .6s ease;
}
.lt-takeover.lt-playing .lt-poster { opacity: 0; pointer-events: none; }

/* YouTube iframe cropped to fill like object-fit:cover */
.lt-yt-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;            /* 16:9 based on width  */
    min-height: 100%;
    min-width: 177.78vh;        /* 16:9 based on height */
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;       /* clicks belong to our chrome */
}

/* ---------- readability scrims ---------- */
.lt-takeover::before,
.lt-takeover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 26%;
    pointer-events: none;
    z-index: 3;
}
.lt-takeover::before { top: 0;    background: linear-gradient(to bottom, rgba(0,0,0,.72), transparent); }
.lt-takeover::after  { bottom: 0; background: linear-gradient(to top,    rgba(0,0,0,.78), transparent); }

/* ---------- top label bar (the "ADVERTISEMENT" slot) ---------- */
.lt-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 26px;
    background: #000;
    color: #fff;
    font: 700 11px/1 var(--lt-font-display);
    letter-spacing: .18em;
    text-transform: uppercase;
}
.lt-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--lt-red);
    box-shadow: 0 0 0 0 rgba(204,0,0,.8);
    animation: lt-pulse 2s infinite;
}
@keyframes lt-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(204,0,0,.75); }
    70%  { box-shadow: 0 0 0 9px rgba(204,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(204,0,0,0); }
}

/* ---------- headline block ---------- */
.lt-copy {
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    text-align: center;
    padding: 0 24px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0,0,0,.65);
    pointer-events: none;
}
.lt-copy > * { pointer-events: auto; }
.lt-headline {
    margin: 0 0 10px;
    font: 900 clamp(28px, 5.2vw, 68px)/1.02 var(--lt-font-display);
    letter-spacing: .02em;
    text-transform: uppercase;
}
.lt-sub {
    margin: 0 auto 22px;
    max-width: 46ch;
    font: 500 clamp(15px, 1.5vw, 20px)/1.45 var(--lt-font);
    opacity: .92;
}
.lt-cta {
    display: inline-block;
    padding: 13px 30px;
    background: var(--lt-red);
    color: #fff;
    border: 0;
    border-radius: 3px;
    font: 700 15px/1 var(--lt-font-display);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.lt-cta:hover { background: #a30000; transform: translateY(-2px); color: #fff; }

/* ---------- mute toggle (bottom-left, like the LA Times unit) ---------- */
.lt-mute {
    position: absolute;
    left: 26px;
    bottom: 26px;
    z-index: 7;
    width: 54px; height: 54px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.45);
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: background .15s ease;
}
.lt-mute:hover { background: rgba(0,0,0,.75); }

/* ---------- scroll prompt ---------- */
.lt-prompt {
    position: absolute;
    left: 0; right: 0;
    bottom: 30px;
    z-index: 7;
    background: none;
    border: 0;
    color: #fff;
    font: 700 clamp(14px, 1.6vw, 22px)/1 var(--lt-font-display);
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    text-shadow: 0 2px 12px rgba(0,0,0,.8);
    animation: lt-nudge 2.4s ease-in-out infinite;
}
@keyframes lt-nudge {
    0%, 100% { transform: translateY(0);   opacity: .85; }
    50%      { transform: translateY(6px); opacity: 1;   }
}

/* ---------- offline / error state ---------- */
.lt-status {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 7;
    padding: 10px;
    text-align: center;
    font: 600 13px/1 var(--lt-font);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0,0,0,.6);
    display: none;
}
.lt-takeover.lt-offline .lt-status { display: block; }
.lt-takeover.lt-offline .lt-prompt { bottom: 62px; }

/* ---------- docked mini player ---------- */
.lt-spacer { display: none; }
.lt-takeover.lt-mini {
    position: fixed;
    right: 18px;
    bottom: 18px;
    left: auto;
    top: auto;
    width: 340px;
    height: 191px;
    border-radius: 8px;
    box-shadow: 0 10px 34px rgba(0,0,0,.55);
    z-index: 99998;
}
.lt-takeover.lt-mini .lt-copy,
.lt-takeover.lt-mini .lt-prompt,
.lt-takeover.lt-mini::before,
.lt-takeover.lt-mini::after { display: none; }
.lt-takeover.lt-mini .lt-bar { height: 20px; font-size: 9px; }
.lt-takeover.lt-mini .lt-mute { left: 8px; bottom: 8px; width: 34px; height: 34px; font-size: 13px; }
.lt-close {
    display: none;
    position: absolute;
    top: 24px; right: 6px;
    z-index: 8;
    width: 26px; height: 26px;
    background: rgba(0,0,0,.6);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
.lt-takeover.lt-mini .lt-close { display: block; }

/* ---------- mobile ---------- */
@media (max-width: 767px) {
    .lt-takeover { height: var(--lt-h-mobile, 78vh); }
    .lt-mute   { left: 16px; bottom: 16px; width: 46px; height: 46px; font-size: 17px; }
    .lt-prompt { bottom: 20px; letter-spacing: .1em; }
    .lt-takeover.lt-mini { width: 200px; height: 113px; right: 10px; bottom: 10px; }
}

/* ---------- accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    .lt-prompt, .lt-dot { animation: none; }
}
.lt-sr {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- click-to-play (idle) state ---------- */
/* Poster shows, no player exists yet, so no view is registered until the
   visitor actually presses play. */
.lt-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
}
.lt-play-icon {
    width: 96px; height: 96px;
    display: block;
    border-radius: 50%;
    background: var(--lt-red);
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
    position: relative;
    transition: transform .18s ease, background .18s ease;
}
.lt-play-icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 17px 0 17px 28px;
    border-color: transparent transparent transparent #fff;
}
.lt-play:hover .lt-play-icon { transform: scale(1.08); background: #e00000; }
.lt-play:focus-visible .lt-play-icon { outline: 3px solid #fff; outline-offset: 4px; }
.lt-play-label {
    font: 700 clamp(14px, 1.6vw, 20px)/1 var(--lt-font-display);
    letter-spacing: .16em;
    text-transform: uppercase;
    text-shadow: 0 2px 12px rgba(0,0,0,.8);
}

/* While idle: no mute button (nothing is playing), headline sits higher so it
   does not collide with the play button. */
.lt-takeover.lt-idle .lt-mute  { display: none; }
.lt-takeover.lt-idle .lt-copy  { top: 30%; }
.lt-takeover.lt-idle .lt-poster { opacity: 1; }

/* Once playback starts the play button goes away for good */
.lt-takeover.lt-started .lt-play,
.lt-takeover.lt-playing .lt-play { display: none; }

/* Offline + idle: dim the play button, it will show the offline message */
.lt-takeover.lt-offline .lt-play-icon { background: #555; }

@media (max-width: 767px) {
    .lt-play-icon { width: 74px; height: 74px; }
    .lt-play-icon::after { border-width: 13px 0 13px 21px; }
    .lt-takeover.lt-idle .lt-copy { top: 28%; }
}

/* ---------- pre-roll ads (autoplay, muted) ---------- */
.lt-ad-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;                 /* above the poster */
    background: #000;
}
.lt-ad-chrome { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.lt-ad-blocker {
    position: absolute;
    inset: 0;
    pointer-events: auto;       /* swallows clicks / click-through to advertiser */
    cursor: pointer;
    background: transparent;
}
.lt-ad-badge,
.lt-ad-count {
    position: absolute;
    left: 20px;
    background: rgba(0,0,0,.82);
    color: #fff;
    padding: 6px 13px;
    border-radius: 3px;
    font: 700 12px/1 var(--lt-font-display);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.lt-ad-badge { top: 42px; }
.lt-ad-count { top: 78px; font-weight: 600; letter-spacing: .06em; }
.lt-ad-progress {
    position: absolute;
    left: 0; bottom: 0;
    height: 4px;
    width: 0;
    background: var(--lt-red);
    transition: width .25s linear;
}

/* During an ad: hide the livestream chrome, keep the mute toggle */
.lt-takeover.lt-ad .lt-play,
.lt-takeover.lt-ad .lt-copy,
.lt-takeover.lt-ad .lt-prompt,
.lt-takeover.lt-ad .lt-status,
.lt-takeover.lt-ad::before,
.lt-takeover.lt-ad::after { display: none; }
.lt-takeover.lt-ad .lt-mute { display: flex; z-index: 11; }
.lt-takeover.lt-ad .lt-bar  { z-index: 10; }

@media (max-width: 767px) {
    .lt-ad-badge { top: 36px; left: 14px; }
    .lt-ad-count { top: 68px; left: 14px; }
}

/* ---------- phones / portrait: show the whole 16:9 picture ----------
   A full-height box crops a 16:9 stream to a narrow vertical strip on a
   portrait screen. Here the box is exactly 16:9 of the screen width (plus
   the 26px LIVE bar), and the player fits inside it instead of cropping. */
@media (max-width: 767px), (orientation: portrait) and (max-width: 1024px) {
    .lt-takeover { height: calc(56.25vw + 26px); }
    .lt-media    { top: 26px; }
    .lt-yt-frame {
        width: 100%; height: 100%;
        min-width: 0; min-height: 0;
    }
    .lt-media video,
    .lt-media img.lt-poster { object-fit: contain; }

    /* Smaller chrome so it fits the shorter box */
    .lt-takeover::before, .lt-takeover::after { height: 34%; }
    .lt-play { gap: 8px; }
    .lt-play-icon { width: 56px; height: 56px; }
    .lt-play-icon::after { border-width: 10px 0 10px 16px; }
    .lt-play-label { font-size: 12px; }
    .lt-mute   { left: 10px; bottom: 10px; width: 36px; height: 36px; font-size: 14px; }
    .lt-prompt { bottom: 10px; font-size: 11px; }
    .lt-takeover.lt-offline .lt-prompt { bottom: 40px; }
    .lt-takeover.lt-idle .lt-copy { top: 30%; }
    .lt-headline { font-size: 20px; margin-bottom: 4px; }
    .lt-sub, .lt-cta { display: none; }
    .lt-ad-badge { top: 34px; left: 10px; }
    .lt-ad-count { top: 62px; left: 10px; }

    /* The docked mini player keeps its own size; no bar offset inside it */
    .lt-takeover.lt-mini .lt-media { top: 0; }
}
