/* ==========================================================================
   Maakora TV — the woven schedule band
   --------------------------------------------------------------------------
   Shared by the public site and the administration dashboard, which have
   otherwise separate design systems. The band is the same component in
   both: a day of television drawn as proportional bands, after kente
   strip-weaving (docs/DESIGN.md §2.3).

   It lives in its own file rather than being duplicated because the two
   copies would drift, and a schedule that looks different to the operator
   than to the viewer is worse than no styling at all.

   Depends on --line, --ground-lift, --ground-sunk, --text-dim and --sika
   being defined by whichever stylesheet loaded first.
   ========================================================================== */

:root {
    /* Genre colours. Semantic, not decorative: these are what the band is
       coloured by, always paired with a visible title so colour never
       carries meaning alone. */
    --g-news:    #3d7ea6;
    --g-current: #4a6fa5;
    --g-film:    #8e4a9e;
    --g-doc:     #2f8f5b;
    --g-enter:   #e3a62c;
    --g-sport:   #2f9e8f;
    --g-african: #c2622a;
    --g-child:   #b8456d;
    --g-music:   #6a5acd;
    --g-relig:   #7a8b3f;
    --g-ads:     #4a4a52;
    --g-other:   #5d6b70;
}

.band {
    display: flex;
    width: 100%;
    height: 68px;
    border: 1px solid var(--line, #333);
    border-radius: 3px;
    overflow: hidden;
    background: var(--ground-lift, #1d1a16);
    position: relative;
}

.band__block {
    position: relative;
    min-width: 0;
    border-right: 1px solid rgb(0 0 0 / 0.35);
    padding: 0.4rem 0.5rem;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: filter 0.12s ease;
}

.band__block:last-child { border-right: 0; }
.band__block:hover, .band__block:focus-visible { filter: brightness(1.18); }

.band__block-title {
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.band__block-time {
    font-size: 0.7rem;
    opacity: 0.88;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.5);
}

.band__block--ads             { background: var(--g-ads); }
.band__block--news            { background: var(--g-news); }
.band__block--current_affairs { background: var(--g-current); }
.band__block--film            { background: var(--g-film); }
.band__block--documentary     { background: var(--g-doc); }
.band__block--sports          { background: var(--g-sport); }
.band__block--african_stories { background: var(--g-african); }
.band__block--children        { background: var(--g-child); }
.band__block--music           { background: var(--g-music); }
.band__block--religious       { background: var(--g-relig); }
.band__block--other,
.band__block--magazine,
.band__block--series_episode  { background: var(--g-other); }

/* Gold is light enough that white text on it fails contrast. */
.band__block--entertainment { background: var(--g-enter); color: #0a1416; }
.band__block--entertainment .band__block-title,
.band__block--entertainment .band__block-time { text-shadow: none; }

/* The now marker: a thin line with a downward arrowhead. */
.band__now {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--sika, #e3a62c);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.5);
    pointer-events: none;
}

.band__now::after {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 10px;
    height: 10px;
    background: var(--sika, #e3a62c);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.band-axis {
    display: flex;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--text-dim, #999);
    font-variant-numeric: tabular-nums;
}

.band-axis span { flex: 1 1 0; min-width: 0; }

.band-head {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.band-head h2 { margin: 0; }
.band-head a { margin-left: auto; font-size: 0.88rem; font-weight: 600; }

.band-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.9rem;
    margin-top: 0.8rem;
    font-size: 0.78rem;
    color: var(--text-dim, #999);
}

.band-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.band-legend i { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 auto; }

@media (max-width: 760px) {
    .band { height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .band__block { transition: none; }
}
