/* =============================================================================
   Joy Data Solutions — the video library (/videos)
   =============================================================================
   One player with the running order beside it. Wide screens put the list on
   the right where it reads as a playlist; narrow screens stack it under the
   player, because on a phone the video should be the first thing you see.

   Depends on the tokens in brand.css and the slot itself in video.css.
   ============================================================================= */

/* The library is for watching, so the hero states the point and gets out of
   the way: the player should be near the top of the first screen. */
.hero--library { padding-block: clamp(2rem, 1.4rem + 3vw, 3.25rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.hero--library .hero__actions { margin-bottom: var(--space-s); }

.player {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
    gap: clamp(1.5rem, 1rem + 2.5vw, 3rem);
    align-items: start;
}

@media (max-width: 900px) {
    /* The library is for watching, so the hero states the point and gets out of
   the way: the player should be near the top of the first screen. */
.hero--library { padding-block: clamp(2rem, 1.4rem + 3vw, 3.25rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.hero--library .hero__actions { margin-bottom: var(--space-s); }

.player { grid-template-columns: minmax(0, 1fr); }
}

.player__main { display: grid; gap: var(--space-m); min-width: 0; }

.player__slot { box-shadow: var(--shadow-l); }

.player__meta { display: grid; gap: 0.5rem; }

.player__title {
    font-family: var(--font-display);
    font-size: var(--step-2);
    font-weight: 500;
    font-variation-settings: 'SOFT' 0, 'WONK' 0, 'opsz' 36;
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 0;
    color: var(--fg);
}

.player__blurb {
    margin: 0 0 0.35rem;
    max-width: 42rem;
    color: var(--fg-muted);
    line-height: 1.6;
}

/* --- The running order --------------------------------------------------- */
.player__list {
    border: 1px solid var(--rule);
    border-radius: var(--radius-l);
    background: var(--white);
    overflow: hidden;
    position: sticky;
    top: 5.5rem;
}

@media (max-width: 900px) {
    .player__list { position: static; }
}

.player__list-head {
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--slate-400);
}

.playlist {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 28rem;
    overflow-y: auto;
}

@media (max-width: 900px) {
    .playlist { max-height: none; }
}

.playlist__item {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--rule);
    color: var(--slate-500);
}

.playlist__item:last-child { border-bottom: 0; }

.playlist__item.is-live { cursor: pointer; color: var(--fg); }

.playlist__item.is-live:hover,
.playlist__item.is-live:focus-visible {
    background: rgba(14, 74, 71, 0.04);
    outline: none;
}

.playlist__item.is-current {
    background: rgba(216, 154, 43, 0.12);
    box-shadow: inset 3px 0 0 var(--amber-bright);
}

.playlist__n { font-size: 0.75rem; color: var(--amber); }

.playlist__text { display: grid; gap: 0.1rem; min-width: 0; }

.playlist__label {
    font-weight: 600;
    line-height: 1.3;
    font-size: 0.95rem;
}

.playlist__kicker {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--slate-400);
}
