/* =====================================================================
   Setlist page — era color accents, era ribbon, rarity badges, the
   shareable "poster" view, and the view toggles.
   Loaded by resources/views/setlist/show.blade.php.
   ===================================================================== */

:root {
    --era-1970s: #bd150b; /* brand red — the classic era      */
    --era-1980s: #d97706; /* amber                            */
    --era-1990s: #2563eb; /* blue                             */
    --era-2000s: #059669; /* emerald                          */
    --era-other: #6b7280; /* gray — covers / non-album songs  */
}

/* Toggle helper: .row uses display:flex, which beats the UA [hidden]
   rule, so force hidden containers down regardless of their classes. */
[hidden] { display: none !important; }

/* ---- Era color tokens (shared by ribbon, swatches, poster dots) ---- */
.ribbon-1970s { background-color: var(--era-1970s); }
.ribbon-1980s { background-color: var(--era-1980s); }
.ribbon-1990s { background-color: var(--era-1990s); }
.ribbon-2000s { background-color: var(--era-2000s); }
.ribbon-other { background-color: var(--era-other); }

/* ---- #2: rarity badges (+ reused for the compare legend) ---- */
.setlist-badge {
    display: inline-flex;
    align-items: center;
    gap: .2em;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1;
    padding: .22em .5em;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    vertical-align: middle;
}
.setlist-badge--bustout { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.setlist-badge--debut   { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.setlist-badge--dropped { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* A song played in a notable live arrangement (arrangement has show_label). */
.setlist-badge--arrangement { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

/* ---- guest performer pills (stacked below the song title) ----
   A left-aligned vertical stack so a song with several guests doesn't widen the
   Song Title column (each pill is one name wide, not all-in-a-row). */
.guest-pills {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    margin-top: 4px;
}
.guest-pill {
    display: inline-flex;
    align-items: center;
    gap: .25em;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1;
    padding: .24em .55em;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
    text-decoration: none;
    background: #fff7e6;
    color: #9a6a00;
    border: 1px solid #f3d488;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.guest-pill .bi { font-size: .82em; color: #d4a017; }
a.guest-pill:hover,
a.guest-pill:focus { background: #c8102e; color: #fff; border-color: #c8102e; }
a.guest-pill:hover .bi,
a.guest-pill:focus .bi { color: #ffd84d; }
.guest-pill--plain { background: #f5f5f5; color: #6c757d; border-color: #e0e0e0; }
.guest-pill--plain .bi { color: #adb5bd; }

/* ---- #5: poster view ---- */
.setlist-poster {
    max-width: 520px;
    margin: 0 auto 1rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .14);
}
.setlist-poster__head {
    position: relative;
    padding: 1.6rem 1.25rem;
    text-align: center;
    color: #fff;
    background-color: #111;
    background-size: cover;
    background-position: center;
}
.setlist-poster__head::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .72));
}
.setlist-poster__head > * { position: relative; }
.setlist-poster__band {
    font-family: "Bebas Neue", sans-serif;
    font-size: 2.6rem;
    line-height: 1;
    letter-spacing: 4px;
    text-transform: uppercase;
}
.setlist-poster__date {
    font-family: "Bebas Neue", sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin-top: .15rem;
}
.setlist-poster__venue {
    font-size: .85rem;
    opacity: .9;
    margin-top: .15rem;
}
.setlist-poster__list {
    list-style: none;
    margin: 0;
    padding: 1rem 1.5rem 1.25rem;
}
.setlist-poster__section {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .68rem;
    font-weight: 700;
    color: var(--era-1970s);
    margin: .85rem 0 .35rem;
    padding-bottom: .2rem;
    border-bottom: 1px solid #f0f0f0;
}
.setlist-poster__section:first-child { margin-top: 0; }
.setlist-poster__song {
    display: flex;
    align-items: baseline;
    gap: .55rem;
    padding: .22rem 0;
}
.setlist-poster__num {
    flex: 0 0 1.6rem;
    text-align: right;
    font-weight: 700;
    color: var(--era-1970s);
    font-variant-numeric: tabular-nums;
}
.setlist-poster__name { flex: 1 1 auto; }
.setlist-poster__guest {
    display: inline;
    margin-left: .4em;
    font-size: .8em;
    font-style: italic;
    color: #d4a017;
}
.setlist-poster__guest a { color: inherit; text-decoration: none; }
.setlist-poster__guest a:hover,
.setlist-poster__guest a:focus-visible { text-decoration: underline; }
.setlist-poster__foot {
    text-align: center;
    padding: .7rem;
    font-size: .72rem;
    letter-spacing: 1px;
    color: #9ca3af;
    border-top: 1px dashed #e5e7eb;
}

/* ---- Unknown-setlist fallback (empty state + documented-neighbor cards) ---- */

/* Option 1: clean empty state when no documented tour-neighbors exist. */
.setlist-empty {
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
}
.setlist-empty__icon {
    font-size: 2.4rem;
    color: #9ca3af;
}
.setlist-empty__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: .6rem 0 .3rem;
}
.setlist-empty__body {
    font-size: .9rem;
    color: #6b7280;
    max-width: 24rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* Option 2: "this show's setlist is unknown — here's what's nearby" note. */
.setlist-unknown-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: .75rem .9rem;
    color: #92400e;
}
.setlist-unknown-note .bi { font-size: 1.05rem; line-height: 1.5; }
.setlist-unknown-note p { font-size: .9rem; line-height: 1.55; }
.setlist-unknown-note a { color: #92400e; font-weight: 600; }

/* Option 2: the documented before/after neighbor cards. */
.setlist-neighbor-card {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.setlist-neighbor-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}
.setlist-neighbor-card__label {
    font-size: .75rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: .5rem;
}
.setlist-neighbor-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111;
}
.setlist-neighbor-card__venue {
    font-size: .82rem;
    color: #6b7280;
    margin-bottom: .65rem;
}
.setlist-neighbor-card__stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .82rem;
    color: #6b7280;
    border-top: 1px solid #f0f0f0;
    padding-top: .6rem;
}
.setlist-neighbor-card__stats strong { color: #111; font-weight: 600; }
.setlist-neighbor-card__view {
    margin-left: auto;
    color: var(--era-1970s);
    font-weight: 600;
}

/* Dropped-song pills in the Stats view's vs.-previous-show strip. */
.setlist-cmp-pill {
    display: inline-flex;
    align-items: center;
    gap: .25em;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1;
    padding: .3em .65em;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
}
.setlist-cmp-pill--dropped {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
.setlist-cmp-pill--dropped:hover { background: #fee2e2; color: #991b1b; }


/* ---- Lineup chips (band + touring musicians who played this show) ----
   Two labeled groups below the setlist, modeled on the album page's
   .album-personnel chips (album-hero.css isn't loaded here, so the chip
   styles are duplicated locally — same pattern as song-hero.css). */
.setlist-lineup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0 1rem;
}
.setlist-lineup__group {
    width: 100%;
    text-align: center;
}
.setlist-lineup__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: rgba(24, 21, 31, 0.55);
    margin-bottom: 0.5rem;
}
.setlist-lineup__chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}
.setlist-lineup__chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.83rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #f1f1f3;
    color: #18151f;
}
.setlist-lineup__role {
    font-size: 0.78rem;
    color: rgba(24, 21, 31, 0.5);
}
/* Substitute marker: a member temporarily filling in for a core band member.
   Shown in the Band Members group, distinguished with an amber accent + "sub" tag. */
.setlist-lineup__chip--sub {
    background: #fbf1da;
    box-shadow: inset 0 0 0 1px #e9d39a;
}
.setlist-lineup__sub {
    align-self: center;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #e0a93a;
    color: #2c2207;
}

/* The full-bleed hero (.shero / .shero--full) moved to a shared
   public/css/hero-full.css, now used by both the setlist and tour pages. */

/* Setlist List view "% of shows" reliability bar — how dependably each song
   appeared over the tour (tour plays / tour concert count). Mirrors the tour
   page's song-stats bar (.tour-pct-* in tour.css), duplicated here since the
   setlist page doesn't load tour.css. */
.tour-pct-cell {
    white-space: nowrap;
}
.tour-pct-bar {
    display: inline-block;
    width: 60%;
    max-width: 90px;
    height: 0.55rem;
    vertical-align: middle;
    background: #ececec;
    border-radius: 3px;
    overflow: hidden;
}
.tour-pct-bar__fill {
    display: block;
    height: 100%;
    background: #c8102e;
    border-radius: 3px;
}
.tour-pct-label {
    display: inline-block;
    margin-left: 0.4rem;
    font-size: 0.8rem;
    color: #6c757d;
    vertical-align: middle;
}

/* ===========================================================================
   Prev / next show pager — named cards (date + location) at page bottom.
   Duplicated from tour.css (.tour-pager*) since the setlist page doesn't load
   tour.css; keeps the two pagers visually identical.
   =========================================================================== */
.tour-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0.75rem;
}
.tour-pager__card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    text-decoration: none;
    color: #18151f;
    background: #fff;
    border: 1px solid rgba(24, 21, 31, 0.15);
    border-radius: 0.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tour-pager__card:hover {
    border-color: #c8102e;
    box-shadow: 0 2px 8px rgba(200, 16, 46, 0.12);
    color: #18151f;
}
.tour-pager__card--next {
    flex-direction: row;
    justify-content: flex-end;
    text-align: right;
}
.tour-pager__card--empty {
    border: 1px dashed rgba(24, 21, 31, 0.1);
    background: transparent;
    box-shadow: none;
}
.tour-pager__chev {
    font-size: 1.4rem;
    color: #c8102e;
    flex: none;
}
.tour-pager__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.tour-pager__eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(24, 21, 31, 0.5);
}
.tour-pager__name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}
.tour-pager__years {
    font-size: 0.8rem;
    color: rgba(24, 21, 31, 0.6);
}

/* On narrow screens stack the two cards vertically. */
@media screen and (max-width: 640px) {
    .tour-pager {
        grid-template-columns: 1fr;
    }
    .tour-pager__card--empty {
        display: none;
    }
}

/* ---- Tempo curve (the show's pacing, song by song) ---- */
.setlist-tempo-chart { position: relative; width: 100%; height: 320px; }
.setlist-tempo-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; margin-bottom: .5rem; font-size: .8rem; color: rgba(24, 21, 31, .7); }
.setlist-tempo-legend > span { display: inline-flex; align-items: center; }
.setlist-tempo-swatch { width: .75rem; height: .75rem; border-radius: 50%; margin-right: .35rem; display: inline-block; }
.setlist-tempo-free-swatch { width: .6rem; height: .6rem; margin-right: .45rem; display: inline-block; border: 2px solid #8a8f98; background: #fff; transform: rotate(45deg); }
@media (max-width: 575.98px) { .setlist-tempo-chart { height: 260px; } }

/* ---- Setlist note (setlist/partials/notes): one slim line that opens to the full
   text. Holds the partial / order flags + the admin's public setlist note. ---- */
.setlist-note { border: 1px solid #dee2e6; border-radius: 8px; background: #fff; font-size: .9rem; }
.setlist-note summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem;
    padding: .45rem .8rem; color: #495057;
}
.setlist-note summary::-webkit-details-marker { display: none; }
.setlist-note summary .bi { color: #c8102e; flex: none; }
.setlist-note__preview { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setlist-note__heading { display: none; flex: 1; font-weight: 600; }
.setlist-note[open] .setlist-note__preview { display: none; }
.setlist-note[open] .setlist-note__heading { display: block; }
.setlist-note__more { flex: none; font-size: .8rem; color: #6c757d; }
.setlist-note__more::after { content: ' \25BE'; }
.setlist-note[open] .setlist-note__more::after { content: ' \25B4'; }
.setlist-note__body { padding: .1rem .8rem .6rem 2.05rem; color: #343a40; }
.setlist-note__body p { margin-bottom: .35rem; line-height: 1.55; }
.setlist-note__body p:last-child { margin-bottom: 0; }
/* A single short note that fits on its line: nothing to open. */
.setlist-note.is-static summary { cursor: default; }
.setlist-note.is-static .setlist-note__more { display: none; }

/* ---- Stats view table (setlist/partials/stats-table) ----
   Scope header row groups the columns by point of view; the gap leads the Last played
   cell, the date sits under it; a green dot marks songs not in the previous show. */
.setlist-v2 { margin-bottom: 0; }
.setlist-v2 > tbody > tr > * { padding-top: .45rem; padding-bottom: .45rem; vertical-align: top; }
.setlist-v2-scope > th { border-bottom: 0; padding-bottom: 0; }
.setlist-v2-scope > th > span {
    display: block;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a8f96;
    border-bottom: 2px solid #c8102e;
    padding-bottom: .2rem;
}
.setlist-v2-scope > th:last-child > span { border-bottom-color: #6c757d; }
.setlist-v2-section > td {
    background: #212529;
    color: #fff;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.05rem;
    letter-spacing: .06em;
    padding: .3rem .6rem;
}
.setlist-v2-note { font-size: .8rem; color: #6c757d; margin-top: .1rem; }
.setlist-v2-last { white-space: nowrap; }
.setlist-v2-gap { display: block; font-size: .85rem; color: #8a8f96; line-height: 1.25; }
.setlist-v2-gap--new { color: #212529; font-weight: 600; }
.setlist-v2-date { display: block; font-size: .76rem; color: #8a8f96; line-height: 1.25; }
.setlist-v2-date:hover { color: #c8102e; }
.setlist-v2-dot {
    display: inline-block;
    width: .5rem; height: .5rem;
    border-radius: 50%;
    background: #16a34a;
    margin-right: .35rem;
    vertical-align: .05rem;
}
.setlist-v2-venue { font-size: .85rem; color: #8a8f96; }
.setlist-v2-venue--first { color: #212529; font-weight: 600; }
.setlist-v2-vs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem 1.25rem;
    font-size: .88rem;
    color: #495057;
    background: #f6f7f8;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: .55rem .8rem;
    margin-bottom: 1rem;
}
.setlist-v2-vs__new { font-weight: 600; color: #212529; }
.setlist-v2-vs__dropped { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.setlist-v2.my-table-responsive { min-width: 620px; }
a.setlist-v2-gap:hover { color: #c8102e; }

/* ---- Medley rail (Stats + Poster views) ----
   A medley song is played within the main song above it. A thin line drops from
   under the main song, ticks into each medley song, and ends at the last one. Works in both the List table and the Poster list.
   --sl-rail-x = where the line sits, --sl-tick-y = height of the first text line. */
.sl-within-host, .sl-within-item { position: relative; --sl-rail-x: .85rem; --sl-tick-y: 1.2rem; }
.setlist-poster__name.sl-within-host,
.setlist-poster__name.sl-within-item { --sl-rail-x: .45rem; --sl-tick-y: .75rem; }
/* stub in the main song's bottom gap, so the line never runs through its pills/notes */
.sl-within-host::after {
    content: "";
    position: absolute;
    left: var(--sl-rail-x);
    bottom: 0;
    height: .45rem;
    border-left: 2px solid #c9cdd2;
}
.setlist-poster__name.sl-within-host::after { bottom: -.22rem; height: .3rem; }
.sl-within-item { padding-left: calc(var(--sl-rail-x) + 1.05rem) !important; }
.sl-within-item::before {               /* the vertical rail through the row */
    content: "";
    position: absolute;
    left: var(--sl-rail-x);
    top: 0;
    bottom: 0;
    border-left: 2px solid #c9cdd2;
}
.sl-within-item::after {                /* the tick into the song name */
    content: "";
    position: absolute;
    left: var(--sl-rail-x);
    top: var(--sl-tick-y);
    width: .7rem;
    border-top: 2px solid #c9cdd2;
}
.setlist-poster__name.sl-within-item::before { top: -.22rem; bottom: -.22rem; }
.sl-within-item--last::before { bottom: auto; height: var(--sl-tick-y); }
.setlist-poster__name.sl-within-item--last::before { height: calc(var(--sl-tick-y) + .22rem); }
