/*!
 * Zama Player — Custom Vimeo Player
 * Full-featured player styles: controls, progress, fullscreen, drawing, feedback badges.
 */

/* ═══════════════════════════════════════════════════════
   Container + video wrap
   ═══════════════════════════════════════════════════════ */

.zama-player {
    position: relative;
    width: 100%;
    background: #000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.zama-player * { box-sizing: border-box; }

/* Keep 16:9 ratio via padding hack (default). */
.zama-player-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.zama-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: auto;
}

/* Transparent overlay above the iframe that captures clicks/taps
   (iframes swallow clicks cross-origin — we need our own hit target). */
.zama-click-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: pointer;
    background: transparent;
}
/* When drawing is active, the canvas (z-index: 6) takes over. */
.zama-player.is-drawing .zama-click-overlay { pointer-events: none; }

/* ═══════════════════════════════════════════════════════
   Top-left title overlay (video name fetched via Vimeo SDK).
   Auto-hides with the controls bar when idle during playback.
   ═══════════════════════════════════════════════════════ */

.zama-title-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    max-width: calc(100% - 24px);
    padding: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    z-index: 7;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Chip-style dark pill behind the title text only (not full-width) */
.zama-title-overlay .zama-title-text {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 6px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
/* Visible only once Vimeo returned a title */
.zama-title-overlay.is-ready { opacity: 1; }
/* Auto-hide during idle playback (mirrors controls bar) */
.zama-player.is-idle.is-playing .zama-title-overlay { opacity: 0; }

@media (max-width: 600px) {
    .zama-title-overlay { font-size: 13px; top: 10px; left: 10px; }
    .zama-title-overlay .zama-title-text { padding: 5px 10px; }
}

/* ═══════════════════════════════════════════════════════
   Center flash icon — briefly shown on play/pause state change
   (YouTube-style). Never interactive, never sticks around.
   ═══════════════════════════════════════════════════════ */

.zama-bigplay {
    position: absolute;
    top: 50%; left: 50%;
    width: 70px; height: 70px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    padding: 0;
    pointer-events: none;     /* purely visual — video overlay handles clicks */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
}
.zama-bigplay svg {
    width: 34px; height: 34px;
    fill: #fff;
    margin-left: 2px;
}
.zama-bigplay.is-flash {
    animation: zama-flash 0.55s ease-out forwards;
}
@keyframes zama-flash {
    0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.7); }
    30%  { opacity: 0.88; transform: translate(-50%, -50%) scale(1.0); }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.4); }
}

/* ═══════════════════════════════════════════════════════
   Bottom controls bar
   ═══════════════════════════════════════════════════════ */

.zama-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.45) 70%, transparent 100%);
    padding: 30px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 1;
    transition: opacity 0.25s ease;
}
/* Auto-hide when mouse idle + playing (JS toggles .is-idle on .zama-player) */
.zama-player.is-idle.is-playing .zama-controls { opacity: 0; pointer-events: none; }
.zama-player.is-idle.is-playing .zama-bigplay  { opacity: 0; }

/* Row layouts */
.zama-ctrl-row { display: flex; align-items: center; gap: 4px; }
.zama-ctrl-row-top    { padding: 0 2px; }
.zama-ctrl-row-bottom { padding: 0 2px; }

.zama-ctrl-spacer { flex: 1 1 auto; }

/* Logo / branding in the controls bar (middle area) */
.zama-ctrl-spacer.has-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.zama-logo {
    max-height: var(--zama-logo-h-desktop, 28px);
    max-width: 60%;
    width: auto;
    height: auto;
    opacity: var(--zama-logo-opacity, 0.85);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.2s;
    object-fit: contain;
}
.zama-logo:hover { opacity: 1; }
@media (max-width: 900px) {
    .zama-logo { max-height: var(--zama-logo-h-tablet, 24px); }
}
@media (max-width: 600px) {
    .zama-logo { max-height: var(--zama-logo-h-mobile, 20px); }
}

/* ═══════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════ */

.zama-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 38px; height: 38px;
    padding: 0;
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    position: relative;
    flex-shrink: 0;
}
.zama-btn:hover  { background: rgba(255,255,255,0.15); }
.zama-btn:active { transform: scale(0.92); }
.zama-btn:focus-visible { outline: 2px solid #4dabf7; outline-offset: 2px; }
.zama-btn svg {
    width: 22px; height: 22px;
    stroke: currentColor; fill: none;
    stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
    pointer-events: none;
}
.zama-btn.is-filled svg { fill: currentColor; stroke: none; }
.zama-btn.is-active { color: #4dabf7; }

/* Seek-10/+10 buttons with number overlay */
.zama-btn-seek { position: relative; }
.zama-btn-seek .zama-seek-num {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -42%);
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   Progress bar
   ═══════════════════════════════════════════════════════ */

.zama-progress {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    cursor: pointer;
    transition: height 0.1s;
    margin-bottom: 4px;
}
.zama-progress:hover,
.zama-progress.is-dragging { height: 6px; }

.zama-progress-buffered,
.zama-progress-played {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    border-radius: 4px;
    pointer-events: none;
}
.zama-progress-buffered { background: rgba(255,255,255,0.35); }
.zama-progress-played   { background: #4dabf7; }

.zama-progress-handle {
    position: absolute;
    top: 50%;
    width: 12px; height: 12px;
    background: #4dabf7;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.zama-progress:hover .zama-progress-handle,
.zama-progress.is-dragging .zama-progress-handle { transform: translate(-50%, -50%) scale(1); }

.zama-progress-hover-time {
    position: absolute;
    bottom: 16px;
    padding: 3px 6px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    font-size: 11px;
    border-radius: 3px;
    transform: translateX(-50%);
    pointer-events: none;
    white-space: nowrap;
    display: none;
}
.zama-progress:hover .zama-progress-hover-time { display: block; }

/* ═══════════════════════════════════════════════════════
   Time display
   ═══════════════════════════════════════════════════════ */

.zama-time {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #fff;
    opacity: 0.9;
}
.zama-time-sep { margin: 0 3px; opacity: 0.6; }

/* ═══════════════════════════════════════════════════════
   Volume
   ═══════════════════════════════════════════════════════ */

.zama-volume-group {
    display: inline-flex;
    align-items: center;
    position: relative;
}
.zama-volume-slider {
    width: 0;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 4px;
    cursor: pointer;
    margin-left: 2px;
    overflow: hidden;
    transition: width 0.2s ease;
    position: relative;
}
.zama-volume-group:hover .zama-volume-slider,
.zama-volume-slider.is-dragging { width: 70px; margin-left: 6px; }
.zama-volume-slider-fill {
    height: 100%;
    background: #fff;
    border-radius: 4px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   Settings menu (popover)
   ═══════════════════════════════════════════════════════ */

.zama-menu {
    position: absolute;
    bottom: 55px;
    right: 12px;
    min-width: 240px;
    max-width: 320px;
    overflow: hidden;   /* panels handle their own scroll */
    background: rgba(28, 28, 30, 0.98);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    z-index: 20;
    display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    font-family: inherit;
}
.zama-menu.is-open { display: block; }

/* ── Panels (main / submenus) ── */
.zama-menu-panel {
    padding: 6px;
    display: none;
    max-height: 340px;   /* desktop cap — panels scroll if taller */
    overflow-y: auto;
}

/* ══════════════════════════════════════════════════
   MOBILE: keep the popup near the ⚙ button inside the player.
   Scroll inside the panel if the list is too long.
   Fullscreen mode still gets the roomy popup since the player
   takes the whole screen. No bottom-sheet — it was obscuring
   the toolbar + part of the video.
   ══════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .zama-menu {
        min-width: 200px;
        max-width: 85%;
        right: 6px;
        bottom: 50px;
    }
    .zama-menu-panel {
        /* Height capped so the menu fits above the controls bar
           even on short portrait videos. Items scroll if needed. */
        max-height: 170px;
        padding: 4px;
    }
    /* Fullscreen has room — allow taller menus */
    .zama-player:fullscreen .zama-menu-panel,
    .zama-player:-webkit-full-screen .zama-menu-panel {
        max-height: 50vh;
    }
    /* Slightly bigger tap targets on touch screens */
    .zama-menu-row,
    .zama-menu-back {
        padding: 10px 14px;
        font-size: 14px;
    }
    .zama-menu-item {
        padding: 10px 14px;
        font-size: 14px;
    }
}
.zama-menu-panel.is-active { display: block; }
.zama-menu-panel[hidden]   { display: none !important; }
.zama-menu-panel::-webkit-scrollbar { width: 6px; }
.zama-menu-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

/* ── Main panel ROW (label + value + chevron) ── */
.zama-menu-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.12s;
}
.zama-menu-row:hover { background: rgba(255,255,255,0.08); }
.zama-menu-row[hidden] { display: none; }
.zama-menu-label {
    flex-shrink: 0;
    font-weight: 500;
}
.zama-menu-value {
    flex: 1 1 auto;
    text-align: right;
    padding: 0 4px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zama-menu-chev {
    flex-shrink: 0;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    line-height: 1;
}

/* ── Submenu back header ── */
.zama-menu-back {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.12s;
}
.zama-menu-back:hover { background: rgba(255,255,255,0.08); }
.zama-menu-chev-back {
    font-size: 22px;
    color: rgba(255,255,255,0.7);
    line-height: 1;
    width: 22px;
    text-align: center;
}
.zama-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 2px;
}

/* ── Submenu ITEM (selectable option) ── */
.zama-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: background 0.12s;
}
.zama-menu-item:hover { background: rgba(255,255,255,0.08); }
.zama-menu-item.is-selected { color: #4dabf7; font-weight: 600; }
.zama-menu-item .zama-check {
    width: 14px; height: 14px;
    opacity: 0;
}
.zama-menu-item.is-selected .zama-check { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   Feedback badges (YouTube-style +10s/-10s)
   ═══════════════════════════════════════════════════════ */

.zama-feedback {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    z-index: 15;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.12s ease-out;
    white-space: nowrap;
}
.zama-feedback.is-show { opacity: 1; }
.zama-feedback svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    stroke-width: 2.5;
    stroke-linecap: round; stroke-linejoin: round;
}
.zama-feedback-left  { left: 14%; }
.zama-feedback-right { right: 14%; }

/* ═══════════════════════════════════════════════════════
   Drawing canvas + toolbar
   ═══════════════════════════════════════════════════════ */

.zama-draw-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 6;
    display: none;
    pointer-events: none;
    cursor: crosshair;
}
.zama-draw-canvas.is-active {
    display: block;
    pointer-events: auto;
}

.zama-draw-toolbar {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    background: rgba(0,0,0,0.8);
    border-radius: 12px;
    padding: 6px 10px;
    display: none;
    gap: 4px;
    align-items: center;
}
.zama-draw-toolbar.is-active { display: inline-flex; }
.zama-draw-toolbar button {
    width: 36px; height: 36px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}
.zama-draw-toolbar button:hover { background: rgba(255,255,255,0.15); }
.zama-draw-toolbar button svg {
    width: 20px; height: 20px;
    stroke: currentColor; fill: none;
    stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}
.zama-draw-toolbar .zama-draw-clear { color: #ff6b6b; }
.zama-draw-toolbar .zama-draw-close { color: #ffd43b; }
.zama-draw-toolbar .zama-draw-sep { width: 1px; height: 24px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.zama-draw-colors { display: flex; gap: 4px; align-items: center; margin: 0 4px; }
.zama-draw-color {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
}
.zama-draw-color:hover { transform: scale(1.1); }
.zama-draw-color.is-selected { border-color: #fff; }

/* ═══════════════════════════════════════════════════════
   Fullscreen — container takes over the screen
   ═══════════════════════════════════════════════════════ */

.zama-player:fullscreen,
.zama-player:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.zama-player:fullscreen .zama-player-ratio,
.zama-player:-webkit-full-screen .zama-player-ratio {
    padding-top: 0 !important;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    aspect-ratio: 16 / 9;
}

/* ── Pseudo-fullscreen (iPhone iOS < 16.4 fallback) ──
   Real Fullscreen API doesn't work on arbitrary <div>s on older iOS Safari.
   We emulate it by fixed-positioning the player to fill the viewport so
   our custom controls + drawing canvas stay functional. The only visible
   difference vs real fullscreen is the iOS status bar remains on top. */
.zama-player.is-pseudo-fs {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    /* Fallbacks for iOS dynamic viewport units (notch + address bar) */
    height: 100dvh !important;
    z-index: 2147483647 !important;   /* top of stacking context */
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #000;
}
.zama-player.is-pseudo-fs .zama-player-ratio {
    padding-top: 0 !important;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    aspect-ratio: 16 / 9;
}
/* Lock the page behind the pseudo-fullscreen player so it can't scroll
   or show through touch bleed. Applied to <html> + <body> while active. */
html.zama-pseudo-fs-lock,
body.zama-pseudo-fs-lock {
    overflow: hidden !important;
    position: relative;
    height: 100%;
    touch-action: none;
    overscroll-behavior: contain;
}

/* ═══════════════════════════════════════════════════════
   Responsive — shrink controls on small screens
   ═══════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .zama-btn { width: 34px; height: 34px; }
    .zama-btn svg { width: 20px; height: 20px; }
    .zama-time { font-size: 11px; padding: 0 4px; }
    .zama-bigplay { width: 70px; height: 70px; }
    .zama-bigplay svg { width: 32px; height: 32px; }
    .zama-menu { right: 6px; }
    .zama-draw-toolbar { padding: 4px 8px; }
    .zama-draw-toolbar button { width: 32px; height: 32px; }
    .zama-draw-color { width: 20px; height: 20px; }
    /* Hide some buttons on very small screens */
    .zama-hide-sm { display: none !important; }
}

/* ═══════════════════════════════════════════════════════
   Transcript side-panel (Vimeo-style)
   Slides in from the right, overlays the player, goes fullscreen
   together with the container.
   ═══════════════════════════════════════════════════════ */

.zt-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 45%;
    height: 100%;
    background: rgba(14, 18, 22, 0.96);
    color: #fff;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 15;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}
.zama-player.has-transcript .zt-panel {
    transform: translateX(0);
    pointer-events: auto;
    box-shadow: -6px 0 24px rgba(0, 0, 0, 0.4);
}

/* Header */
.zt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    flex-shrink: 0;
}
.zt-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2px;
}
.zt-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.zt-head-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.zt-head-btn:hover { background: rgba(255, 255, 255, 0.1); }
.zt-head-btn svg { width: 18px; height: 18px; }

/* Search input */
.zt-search-wrap {
    position: relative;
    padding: 0 16px 10px;
    flex-shrink: 0;
}
.zt-search-icon {
    position: absolute;
    top: 10px;
    left: 28px;
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}
.zt-search {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.zt-search:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(77, 171, 247, 0.5);
}
.zt-search::placeholder { color: rgba(255, 255, 255, 0.4); }
/* Remove default browser search cancel button */
.zt-search::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Return-to-current-time button */
.zt-return-btn {
    margin: 0 16px 8px;
    padding: 8px 14px;
    background: #4dabf7;
    color: #0b1a2a;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
}
.zt-return-btn:hover { background: #74c0fc; }
.zt-return-btn:active { transform: scale(0.98); }
.zt-return-btn[hidden] { display: none; }

/* Cue list */
.zt-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 4px 8px 16px;
    scroll-behavior: smooth;
}
.zt-body::-webkit-scrollbar { width: 8px; }
.zt-body::-webkit-scrollbar-track { background: transparent; }
.zt-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.zt-body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* Cue button */
.zt-cue {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    color: rgba(255, 255, 255, 0.7);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 2px;
    transition: background 0.12s, color 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.zt-cue:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.zt-cue.is-active {
    background: rgba(77, 171, 247, 0.12);
    color: #fff;
    font-weight: 500;
}
.zt-cue-text {
    flex: 1 1 auto;
    word-wrap: break-word;
}
.zt-cue-time {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    padding-top: 2px;
    min-width: 40px;
    text-align: right;
}
.zt-cue.is-active .zt-cue-time { color: #4dabf7; }

/* Mobile — full-width overlay */
@media (max-width: 600px) {
    .zt-panel {
        width: 100%;
        max-width: 100%;
    }
    .zt-title { font-size: 16px; }
    .zt-cue { font-size: 13px; }
}

/* Active state for the controls-bar toggle button */
.zama-btn-transcript.is-active {
    color: #4dabf7;
    background: rgba(77, 171, 247, 0.15);
}

/* ═══════════════════════════════════════════════════════
   Loading spinner
   ═══════════════════════════════════════════════════════ */

.zama-spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: zama-spin 0.8s linear infinite;
    z-index: 4;
    display: none;
}
.zama-player.is-loading .zama-spinner { display: block; }
@keyframes zama-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
