/* AI News Broadcast — matches reference mockup layout */

.hero-video-news.ai-news-root {
    margin-bottom: 24px;
}

.ai-news-root {
    font-family: var(--font-sans, "Segoe UI", system-ui, sans-serif);
    --ai-news-stage-height: 400px;
}

/* ── Stage: player + sidebar (compact — matches mockup proportions) ── */
.ai-news-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.95fr);
    gap: 0;
    height: var(--ai-news-stage-height);
    min-height: 0;
    max-height: var(--ai-news-stage-height);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #2a3148;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
    background: #0c0f18;
}

/* ── Left: video player ── */
.ai-news-player {
    display: flex;
    flex-direction: column;
    background: #060a14;
    min-height: 0;
    height: 100%;
}

.ai-video-viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #0a1830;
    overflow: hidden;
}

.ai-presenter-scene,
.ai-presenter-canvas,
.ai-avatar-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.ai-presenter-scene {
    z-index: 1;
    opacity: 1;
}

/* Hidden — keep the photo visible during play (no canvas/video swap) */
.ai-presenter-canvas,
.ai-avatar-video {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}

/* LIVE badge */
.ai-live-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: #d42020;
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    border-radius: 4px;
    line-height: 1;
}

.ai-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    flex-shrink: 0;
}

.ai-live-badge .ai-live-dot {
    animation: aiLivePulse 1.5s ease-in-out infinite;
}

@keyframes aiLivePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .55; }
}

/* Lower third — mockup style */
.ai-lower-third {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    width: 100%;
    pointer-events: none;
}

.ai-l3-headline {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    padding: 10px 16px 9px;
    margin: 0;
    min-height: 40px;
}

.ai-l3-topic {
    display: block;
    width: 100%;
    margin: 0;
    font-family: var(--font-sans, 'Syne', 'Segoe UI', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    letter-spacing: 0;
}

.ai-l3-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    line-height: 1.25;
}

.ai-l3-ticker {
    width: 100%;
    box-sizing: border-box;
    background: #0a1931;
    padding: 10px 16px 11px;
    min-height: 64px;
}

.ai-l3-ticker-row {
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-body, 'DM Sans', 'Segoe UI', sans-serif);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    color: #fff;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ai-l3-ticker-row .ai-l3-title-part {
    font-weight: 700;
    color: #fff;
}

.ai-l3-ticker-row .ai-l3-body-part {
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
}

.ai-l3-summary {
    display: none;
}

/* Player chrome */
.ai-player-chrome {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, .06);
    z-index: 9;
}

.ai-chrome-left,
.ai-chrome-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chrome-btn {
    background: transparent;
    border: none;
    color: #e8e8e8;
    cursor: pointer;
    padding: 4px 6px;
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 4px;
}

.ai-chrome-btn:hover {
    background: rgba(255, 255, 255, .1);
}

.ai-chrome-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .65rem;
    font-weight: 700;
    color: #f87171;
    letter-spacing: .06em;
}

.ai-chrome-settings {
    position: absolute;
    bottom: 100%;
    right: 14px;
    margin-bottom: 4px;
    padding: 12px;
    background: #12151c;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 20;
}

.ai-chrome-settings.is-open {
    display: flex;
}

.ai-chrome-settings label {
    font-size: .65rem;
    color: rgba(255, 255, 255, .75);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ── Right: TOP STORIES ── */
.ai-news-sidebar {
    display: flex;
    flex-direction: column;
    background: #0f1320;
    border-left: 1px solid #1e2438;
    min-height: 0;
    height: 100%;
    overflow: hidden; /* keep scroll inside the story list */
}

.ai-sidebar-head {
    flex: 0 0 auto;
    padding: 12px 16px 10px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: #fff;
    background: #000;
    text-transform: uppercase;
}

.ai-story-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: none; /* Firefox: hide scrollbar */
}

.ai-story-list::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.ai-story-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 8px;
    margin-bottom: 2px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: background .15s;
}

.ai-story-card:hover {
    background: rgba(255, 255, 255, .04);
}

.ai-story-card.is-active {
    background: rgba(59, 130, 246, .12);
}

.ai-story-num {
    flex: 0 0 28px;
    font-size: .85rem;
    font-weight: 800;
    color: #c9a227;
    letter-spacing: .02em;
    line-height: 1.3;
}

.ai-story-meta {
    flex: 1;
    min-width: 0;
}

.ai-story-topic {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: #f2f4f8;
    line-height: 1.35;
}

.ai-story-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, .55);
    line-height: 1.4;
    margin-top: 3px;
    word-break: break-word;
}

.ai-story-time {
    display: block;
    font-size: .68rem;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
}

.ai-sidebar-foot {
    flex: 0 0 auto;
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.ai-view-all {
    font-size: .78rem;
    font-weight: 600;
    color: #4a9eff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.ai-view-all:hover {
    text-decoration: underline;
}

.ai-queue-empty {
    padding: 16px 8px;
    font-size: .78rem;
    color: rgba(255, 255, 255, .45);
    line-height: 1.4;
}

.ai-news-root:fullscreen {
    --ai-news-stage-height: 100vh;
}

.ai-news-root:fullscreen .ai-news-stage {
    border-radius: 0;
    height: 100vh;
    max-height: none;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .ai-news-root {
        --ai-news-stage-height: auto;
    }

    .ai-news-stage {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
    }

    .ai-news-player {
        min-height: 300px;
    }

    .ai-video-viewport {
        flex: 1 1 260px;
        min-height: 260px;
    }

    /* Keep the reporter’s head in frame on narrow viewports */
    .ai-presenter-scene,
    .ai-presenter-canvas,
    .ai-avatar-video {
        object-fit: cover;
        object-position: center top;
    }

    .ai-l3-headline {
        padding: 8px 12px 7px;
        min-height: 36px;
    }

    .ai-l3-ticker {
        min-height: 52px;
        padding: 8px 12px 9px;
    }

    .ai-news-sidebar {
        border-left: none;
        border-top: 1px solid #1e2438;
        height: auto;
        max-height: 220px;
    }

    .ai-story-list {
        max-height: 140px;
    }
}

@media (max-width: 500px) {
    .ai-news-player {
        min-height: 320px;
    }

    .ai-video-viewport {
        min-height: 280px;
    }
}
