@charset "UTF-8";
/* player della pagina della diretta (static/js/player.js): controlli nostri sopra al <video>.
   Si spegne da live.js (USE_CUSTOM_PLAYER = false); per toglierlo del tutto basta togliere questo file e player.js. */

.ico-pause    { --ico: url('/static/icons/lucide/pause.svg'); }
.ico-volume   { --ico: url('/static/icons/lucide/volume-2.svg'); }
.ico-volume-x { --ico: url('/static/icons/lucide/volume-x.svg'); }
.ico-maximize { --ico: url('/static/icons/lucide/maximize.svg'); }
.ico-minimize { --ico: url('/static/icons/lucide/minimize.svg'); }
.ico-back10   { --ico: url('/static/icons/lucide/rotate-ccw.svg'); }
.ico-fwd10    { --ico: url('/static/icons/lucide/rotate-cw.svg'); }

/* gli angoli li ritaglia solo il riquadro esterno: con piu' livelli arrotondati uno sopra l'altro
   lo sfondo di quelli sotto sbordava lungo la curva (alone scuro sugli angoli) */
.player:has(> .cplayer) { background: transparent; }
.cplayer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: transparent; /* niente sfondo scuro sotto al video: sbordava lungo la curva degli angoli */
    color: #fff;
    outline: none;
    user-select: none;
}
.cplayer video {
    /* 1px in piu' per lato: con larghezze a frazioni di pixel il video non copriva l'ultimo pixel (riga nera a destra) */
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    object-fit: contain;
    background: transparent; /* theme.css mette il nero dietro ai video: qui lo da' solo .letterbox */
    cursor: pointer;
}
/* sfondo nero solo se il video non e' 16:9 e restano bande ai lati (o finche' non e' caricato) */
.cplayer.letterbox { background: #000; }
.cplayer.idle,
.cplayer.idle video { cursor: none; }

/* tasto grande al centro, solo in pausa */
.cp-center {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
}
.cp-center .ico { width: 28px; height: 28px; margin-left: 3px; }
.cplayer.paused .cp-center { opacity: 1; pointer-events: auto; }

/* controlli in basso, su una sfumatura scura; spariscono col mouse fermo mentre il video va */
.cp-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 6px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
    transition: opacity .25s;
}
.cplayer.idle .cp-controls { opacity: 0; pointer-events: none; }

/* ---------- barra divisa in capitoli ---------- */
.cp-bar {
    position: relative;
    height: 16px;
    margin: 0 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}
.cp-segs { flex: 1; display: flex; gap: 3px; height: 4px; transition: height .1s; }
.cplayer:not(.chaptered) .cp-segs { gap: 0; }
.cp-bar:hover .cp-segs,
.cplayer.dragging .cp-segs { height: 6px; }
.cp-seg {
    position: relative;
    flex: 1 1 0;
    min-width: 2px;
    overflow: hidden;
    background: rgba(255, 255, 255, .25);
    transition: transform .1s;
}
.cp-seg-buf,
.cp-seg-fill {
    position: absolute;
    inset: 0;
    transform-origin: left;
    transform: scaleX(0);
    transition: none;
}
.cp-seg-buf  { background: rgba(255, 255, 255, .4); }
.cp-seg-fill { background: var(--live, #e00); }
.cp-knob {
    position: absolute;
    top: 50%;
    width: 13px;
    height: 13px;
    margin: -6.5px 0 0 -6.5px;
    border-radius: 50%;
    background: var(--live, #e00);
    transform: scale(0);
    transition: transform .1s;
    pointer-events: none;
}
.cp-bar:hover .cp-knob,
.cplayer.dragging .cp-knob { transform: scale(1); }

/* fumetto sopra la barra: titolo del capitolo e minuto */
.cp-tip {
    position: absolute;
    bottom: 22px;
    max-width: 240px;
    padding: 5px 9px;
    border-radius: 6px;
    background: rgba(28, 28, 28, .9);
    text-align: center;
    transform: translateX(-50%);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
}
.cp-bar:hover .cp-tip,
.cplayer.dragging .cp-tip { opacity: 1; }
.cp-tip-title { overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 600; }
.cp-tip-title:empty { display: none; }
.cp-tip-time { font-size: 12px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .8); }

/* ---------- riga dei tasti ---------- */
.cp-row { display: flex; align-items: center; gap: 2px; height: 40px; font-size: 13px; }
.cp-btn {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    opacity: .9;
}
.cp-btn:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.cp-btn .ico { width: 20px; height: 20px; }
.cp-speed { min-width: 44px; border-radius: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }

.cp-volume { display: flex; align-items: center; }
.cp-volume-range {
    width: 0;
    opacity: 0;
    accent-color: #fff;
    transition: width .15s, opacity .15s;
}
.cp-volume:hover .cp-volume-range,
.cp-volume-range:focus { width: 72px; opacity: 1; margin: 0 6px 0 2px; }

.cp-time { margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-chapter { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cp-chapter:not(:empty)::before { content: "·"; margin: 0 8px; font-weight: 400; opacity: .7; }
.cp-spacer { flex: 1; }

/* ---------- diretta: niente barra ne' tempi, c'e' "IN DIRETTA" ---------- */
.cp-live-badge {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
}
.cp-live-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live, #e00); }
.cplayer.live .cp-live-badge { display: flex; }
.cplayer.live .cp-bar,
.cplayer.live .cp-vod { display: none; }
.cplayer.live .cp-controls { padding-top: 36px; }

