/* ============================================================
   publiek/speler.css - de speler, wat eronder staat en de lijst
   met afleveringen.
   Hoort bij templates/public/delen/_speler.html.
   ============================================================ */

/* speler links, afleveringen rechts */
.kijk {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr);
    align-items: start;
    gap: 18px;
    margin-top: 18px;
}
.kijk-links { min-width: 0; }

/* ----------------------------------------------- de speler */
.speler {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--rand-neon);
    border-radius: var(--rond);
    background: #05071a;
    box-shadow: var(--gloed);
}
.speler iframe { display: block; width: 100%; height: 100%; border: 0; }

/* (9 oktober 2026) groot beeld via onze eigen knop: de hele speler, met
   het balkje van het pakmoment erin (speler.js, toonBalk) */
.speler { container-type: inline-size; }
.speler:fullscreen { aspect-ratio: auto; width: 100%; height: 100%; border: 0; border-radius: 0; }
.speler:-webkit-full-screen { aspect-ratio: auto; width: 100%; height: 100%; border: 0; border-radius: 0; }
.speler-groot {
    position: absolute; right: 1.2cqw; bottom: calc(2.2cqw + max(30px, 4cqw)); z-index: 3;
    width: clamp(30px, 4.2cqw, 64px); height: clamp(30px, 4.2cqw, 64px);
    display: grid; place-items: center;
    font-size: clamp(16px, 2.4cqw, 36px); line-height: 1; color: #fff;
    background: rgba(5, 7, 26, .72); border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 10px; cursor: pointer;
}
.speler-groot:hover { border-color: #4ade80; }

/* het balkje bovenin: welk pakmoment, en een streepje dat leegloopt */
.pm-balk {
    position: absolute; right: 1.2cqw; bottom: 1.2cqw; z-index: 2;
    max-width: 70%;
    background: rgba(11, 16, 34, .9);
    border: max(1.5px, .13cqw) solid #4ade80; border-radius: max(8px, 1cqw);
    overflow: hidden; pointer-events: none;
    box-shadow: 0 .5cqw 2cqw rgba(0, 0, 0, .55);
    transition: opacity .6s, transform .6s;
}
.pm-balk.weg { opacity: 0; transform: translateY(1.5cqw); }
.pm-balk-rij {
    display: flex; align-items: center; gap: max(5px, .8cqw);
    padding: max(4px, .6cqw) max(8px, 1.25cqw);
    font-size: clamp(11px, 1.55cqw, 24px); font-weight: 700; color: #fff; white-space: nowrap;
}
.pm-balk .pm-bol { width: max(7px, .85cqw); height: max(7px, .85cqw); border-radius: 50%; flex: none; }
.pm-balk-wereld { margin-left: auto; padding-left: max(6px, 1cqw); font-weight: 500; color: #9aa3c7; }
.pm-balk-rest { height: max(3px, .35cqw); background: rgba(255, 255, 255, .1); }
.pm-balk-rest i { display: block; height: 100%; width: 100%; background: #4ade80; transition: width .25s linear; }

/* het plaatje met de knop, zolang er nog niets speelt */
.speler-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    text-decoration: none;
    background: radial-gradient(60% 70% at 50% 45%, #27307c, #0a0d2c 75%);
}
.speler-start img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: .72;
    transition: opacity .15s;
}
.speler-start:hover img { opacity: .9; }
.speler-knop {
    position: relative;
    display: grid;
    place-items: center;
    width: 86px; height: 86px;
    padding-left: 5px;
    border-radius: 50%;
    background: var(--paars);
    box-shadow: 0 0 0 8px rgba(124, 58, 237, .28), 0 0 40px rgba(124, 58, 237, .75);
    transition: transform .15s;
}
.speler-start:hover .speler-knop { transform: scale(1.06); }
.speler-uitleg {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 14px 12px;
    background: linear-gradient(180deg, transparent, rgba(4, 6, 22, .88));
    font-size: 13px;
    text-align: center;
    color: #dfe3ff;
}

/* --------------------------------------- onder de speler */
.kijk-onder { margin: 12px 2px 0; }
.kijk-titel { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.kijk-knoppen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    font-size: 13.5px;
}
.stap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #6d5cf0;
    border-radius: var(--rond-klein);
    background: #171c58;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.stap:hover { background: #232a7c; }
.stap.uit { opacity: .35; pointer-events: none; }
.kijk-teller { color: var(--tekst-zacht); }

/* ---------------------------------------- de afleveringen */
.afleveringen {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--rand);
    border-radius: var(--rond);
    background: var(--vlak);
}
.afleveringen header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--rand);
}
.afleveringen header span { font-size: 13px; color: var(--tekst-zacht); }
.afleveringen ol { position: relative; margin: 0; padding: 0; list-style: none; }

/* Een lange lijst schuift: er staan hooguit acht afleveringen in beeld,
   vanaf negen schuif je. Hij wordt ook nooit hoger dan de speler ernaast.
   Een rij is het plaatje (74 breed, 16:9) met 8px erboven en eronder en
   de lijn eronder. */
.afleveringen-lang { align-self: stretch; }
.afleveringen-lang ol {
    --aflevering-rij: calc(74px * 9 / 16 + 17px);
    flex: 1 1 0;
    min-height: 240px;
    max-height: calc(8 * var(--aflevering-rij));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #6d4df0 #10143c;
}

.aflevering {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #161b4a;
    color: var(--tekst);
    font-size: 13.5px;
    text-decoration: none;
}
.afleveringen li:last-child .aflevering { border-bottom: 0; }
.aflevering:hover { background: rgba(124, 58, 237, .1); }
.aflevering.nu { background: rgba(124, 58, 237, .22); box-shadow: inset 3px 0 0 var(--paars-licht); }
.aflevering-nummer { flex: none; width: 22px; text-align: right; color: var(--tekst-dof); }
.aflevering img {
    flex: none;
    width: 74px; height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 5px;
    background: linear-gradient(135deg, #1f2870, #151a4a);
}
.aflevering-titel {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
            line-clamp: 2;
    overflow: hidden;
}
.aflevering-duur { flex: none; color: var(--tekst-zacht); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .kijk { grid-template-columns: minmax(0, 1fr); }
    .afleveringen-lang ol { flex: none; min-height: 0; }
}
@media (max-width: 640px) {
    .speler-knop { width: 64px; height: 64px; }
    .speler-knop .icoon { width: 28px; height: 28px; }
    .speler-uitleg { padding: 20px 10px 8px; font-size: 11.5px; }
    .kijk-titel { font-size: 16px; }
}

/* ------------------------------------------ de reacties (11 okt 2026)
   Onder de lijst Episodes, in het stuk dat naast de speler over is.
   Het rechtervak wordt nooit hoger dan de speler links: de lijst
   Episodes houdt haar hoogte (hooguit 8 rijen), de reacties krijgen
   de rest en schuiven. */
.afleveringen.met-reacties { align-self: stretch; }
.afleveringen.met-reacties ol { flex: 0 1 auto; min-height: 120px; }
.reacties {
    flex: 1 1 0;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--rand);
}
.reacties-kop { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 14px 6px; }
.reacties-wissel { display: flex; gap: 4px; }
.reacties-wissel button {
    font: inherit; font-size: 11.5px; font-weight: 600; color: var(--tekst);
    background: transparent; border: 1px solid var(--rand); border-radius: 999px;
    padding: 2px 9px; cursor: pointer;
}
.reacties-wissel button.aan { background: var(--paars); border-color: var(--paars); }
.reacties-lijst {
    flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 0 14px;
    scrollbar-width: thin; scrollbar-color: #6d4df0 #10143c;
}
.reacties-ep { display: none; margin: 8px 0 2px; font-size: 12px; color: var(--tekst-zacht); font-weight: 700; }
.reacties.alle .reacties-ep { display: block; }
.reactie { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px solid #161b4a; }
.reactie-av {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
    background: #312e81; color: #c7d2fe;
}
.reactie-naam { font-weight: 700; font-size: 13px; }
.reactie-wanneer { margin-left: 6px; font-size: 11.5px; color: var(--tekst-zacht); }
.reactie p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.reactie-tijd { color: var(--paars-licht); font-weight: 600; text-decoration: none; }
.reactie-tijd:hover { text-decoration: underline; }
.reacties-leeg { margin: 8px 0; font-size: 13px; color: var(--tekst-zacht); }
.reacties-melding { margin: 0 14px 6px; font-size: 12.5px; }
.reacties-melding.goed { color: #86efac; }
.reacties-melding.fout { color: #fca5a5; }
.reacties-schrijf { padding: 8px 14px 10px; border-top: 1px solid var(--rand); }
.reacties-schrijf textarea {
    width: 100%; box-sizing: border-box; resize: none; height: 46px;
    background: #070b1f; color: var(--tekst); border: 1px solid var(--rand);
    border-radius: 9px; padding: 6px 8px; font: inherit; font-size: 13px;
}
.reacties-onder { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 5px; font-size: 11.5px; color: var(--tekst-zacht); }
.reacties-onder button {
    font: inherit; font-weight: 700; font-size: 13px; color: #fff; cursor: pointer;
    background: var(--paars); border: 0; border-radius: 9px; padding: 5px 14px;
}
.reacties-login {
    display: block; margin: 8px 14px 10px; padding: 8px; text-align: center;
    border: 1px dashed var(--rand-neon); border-radius: 9px;
    color: #c7d2fe; font-size: 13px; text-decoration: none;
}
@media (max-width: 900px) {
    .reacties { flex: none; min-height: 0; }
    .reacties-lijst { flex: none; max-height: 300px; }
}
.reactie-antwoord {
    margin-top: 2px; padding: 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 600; color: var(--tekst-zacht);
}
.reactie-antwoord:hover { color: var(--paars-licht); }

/* (11 okt 2026) ⤢ groot: Comments over de hele lijst Episodes, even groot */
.afleveringen.met-reacties { position: relative; }
.reacties-kop-rechts { display: flex; align-items: center; gap: 6px; }
.reacties-groot {
    width: 26px; height: 26px; display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--rand-neon); border-radius: 7px; background: #141a45;
    color: var(--tekst); font-size: 14px; line-height: 1; padding: 0;
}
.reacties-groot:hover { border-color: var(--paars-licht); }
.reacties.groot {
    position: absolute; inset: 0; z-index: 5;
    background: var(--vlak); border-top: 0;
    animation: reacties-in .18s ease;
}
.reacties.groot .reacties-schrijf textarea { height: 80px; }
@keyframes reacties-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .reacties-groot { display: none; } }
