/* ==========================================================================
   Festival-Extras der Website: Countdown / Jetzt auf der Bühne, Historie als
   Plakatwand, Zahlen & Fakten, Spotify-Playlist und der leere Baustein.

   Farben und Masse aus den Tokens von festival.css (--fest-*), mit Fallback
   fuer Seiten ohne festival.css. Die dunkle Variante kommt von dort
   (html[data-bs-theme="dark"] setzt die Tokens um) - hier keine eigenen
   Dunkel-Regeln ausser, wo eine Flaeche fest in Markenfarbe steht.
   Mobil zuerst; Breakpoints wie Bootstrap (576/768/992).
   ========================================================================== */

.site-moment,
.history-wall,
.site-facts,
.site-playlist,
.site-extras-empty {
    --x-ink: var(--fest-ink, #14181f);
    --x-muted: var(--fest-ink-muted, #4a5568);
    --x-surface: var(--fest-flaeche, #fff);
    --x-surface-quiet: var(--fest-flaeche-leise, #f5f6f8);
    --x-line: var(--fest-linie, rgba(20, 24, 31, .12));
    --x-primary: var(--fest-primary, var(--brand-primary, #175da9));
    --x-on-primary: var(--fest-on-primary, var(--brand-on-primary, #fff));
    --x-primary-ink: var(--fest-primary-ink, var(--x-primary));
    --x-radius: var(--fest-radius, 14px);
    --x-radius-s: var(--fest-radius-s, 8px);
    --x-display: var(--fest-font-display, var(--brand-font-display, inherit));
}

/* --------------------------------------------------------------------------
   Leerer Baustein
   -------------------------------------------------------------------------- */
.site-extras-empty {
    padding-block: var(--fest-space-m, 2rem);
    text-align: center;
}

.site-extras-empty__title {
    margin-bottom: .5rem;
}

.site-extras-empty__text {
    max-width: 40rem;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    border: 1px dashed var(--x-line);
    border-radius: var(--x-radius-s);
    color: var(--x-muted);
}

/* --------------------------------------------------------------------------
   Countdown / Jetzt auf der Bühne
   -------------------------------------------------------------------------- */
.site-moment {
    padding-block: var(--fest-space-m, 2rem);
    text-align: center;
}

.site-moment__kicker {
    margin: 0 0 1rem;
    font-size: var(--fest-step-1, 1.25rem);
    font-weight: 700;
}

.site-moment__clock {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
    max-width: 36rem;
    margin: 0 auto;
}

.site-moment__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .75rem .25rem;
    border-radius: var(--x-radius);
    background: var(--x-primary);
    color: var(--x-on-primary);
}

.site-moment__value {
    font-family: var(--x-display);
    font-size: clamp(2rem, 9vw, 4rem);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.site-moment__unit-label {
    margin-top: .35rem;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.site-moment__date {
    margin: 1rem 0 0;
    color: var(--x-muted);
}

.site-moment__title {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.25rem;
}

.site-moment__pulse {
    width: .8rem;
    height: .8rem;
    border-radius: 50%;
    background: #e5383b;
    box-shadow: 0 0 0 0 rgba(229, 56, 59, .6);
    animation: site-moment-pulse 1.6s infinite;
}

@keyframes site-moment-pulse {
    70% { box-shadow: 0 0 0 .7rem rgba(229, 56, 59, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 56, 59, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .site-moment__pulse { animation: none; }
}

.site-moment__stages {
    display: grid;
    gap: .75rem;
    margin: 0;
    text-align: left;
}

@media (min-width: 768px) {
    .site-moment__stages {
        grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    }
}

.site-moment__stage {
    padding: 1rem 1.25rem;
    border: 1px solid var(--x-line);
    border-top: 4px solid var(--x-primary);
    border-radius: var(--x-radius);
    background: var(--x-surface);
    color: var(--x-ink);
}

.site-moment__stage-name {
    margin: 0 0 .5rem;
    font-size: var(--fest-step-0, 1rem);
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--x-muted);
}

.site-moment__act {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .6rem;
    margin: 0 0 .35rem;
}

.site-moment__act--now .site-moment__band {
    font-size: var(--fest-step-2, 1.5rem);
    line-height: 1.15;
}

.site-moment__act--next {
    color: var(--x-muted);
}

.site-moment__tag {
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--x-surface-quiet);
    color: var(--x-ink);
}

.site-moment__act--now .site-moment__tag {
    background: var(--x-primary);
    color: var(--x-on-primary);
}

.site-moment__time {
    font-variant-numeric: tabular-nums;
    font-size: .9rem;
}

.site-moment__text {
    margin: 0 auto .5rem;
    max-width: 40rem;
    font-size: var(--fest-step-1, 1.15rem);
}

.site-moment__next {
    display: block;
    margin-top: .25rem;
    font-family: var(--x-display);
    font-size: var(--fest-step-3, 2rem);
    color: var(--x-primary-ink);
}

/* --------------------------------------------------------------------------
   Historie als Plakatwand (FE_History, design = wall)
   -------------------------------------------------------------------------- */
.history-wall {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
}

@media (min-width: 576px) {
    .history-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
    .history-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
    .history-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.history-poster {
    --history-brand: var(--x-primary);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--x-line);
    border-radius: var(--x-radius);
    background: var(--x-surface);
    color: var(--x-ink);
}

.history-wall__item.is-current .history-poster {
    border-color: var(--history-brand);
    box-shadow: 0 0 0 2px var(--history-brand);
}

.history-poster__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 1.25rem;
    background: var(--x-surface-quiet);
}

.history-poster__visual.is-dark,
.history-poster__visual.is-type {
    background: var(--history-brand);
    color: var(--history-on-brand, var(--x-on-primary));
}

/* Eigene Farbe des Jahrgangs (inline): Schrift weiss mit Schatten. */
.history-poster[style*="--history-brand"] {
    --history-on-brand: #fff;
}



.history-poster__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-poster__logo {
    max-width: 80%;
    max-height: 70%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.history-poster__bigyear {
    font-family: var(--x-display);
    font-size: clamp(3rem, 14vw, 5rem);
    line-height: 1;
    letter-spacing: .02em;
    opacity: .95;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}

.history-poster__year {
    position: absolute;
    left: .75rem;
    top: .75rem;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, .72);
    color: #fff;
}

.history-poster__visual.is-type .history-poster__year {
    display: none;
}

.history-poster__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 1.1rem 1.1rem;
}

.history-poster__edition {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--x-muted);
}

.history-poster__name {
    margin: 0;
    font-size: var(--fest-step-1, 1.2rem);
    font-weight: 700;
    line-height: 1.2;
}

.history-poster__lineup {
    margin: 0;
    line-height: 1.45;
}

.history-poster__label {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--x-muted);
}

.history-poster__band {
    font-weight: 600;
}

.history-poster__sep,
.history-poster__more {
    color: var(--x-muted);
}

.history-poster__more {
    white-space: nowrap;
    margin-left: .25rem;
}

.history-poster .festival-history__links {
    margin-top: auto;
    padding-top: .25rem;
}

/* --------------------------------------------------------------------------
   Zahlen & Fakten automatisch (FE_Facts) - wie block-fact-1, ohne Zaehler
   -------------------------------------------------------------------------- */
.site-facts__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 1rem;
    margin: 2rem 0 0;
    text-align: center;
}

.site-facts__item {
    flex: 0 1 calc(50% - .5rem);
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .site-facts__item { flex-basis: 10rem; }
}

.site-facts__value {
    font-family: var(--x-display);
    font-size: clamp(2.25rem, 8vw, 3.5rem);
    line-height: 1;
    font-weight: 700;
    color: var(--x-primary-ink);
    font-variant-numeric: tabular-nums;
}

.site-facts__unit {
    margin-left: .05em;
}

.site-facts__label {
    display: block;
    margin-top: .5rem;
    font-size: .95rem;
    color: var(--x-muted);
}

/* --------------------------------------------------------------------------
   Spotify-Playlist (FE_Playlist) - Flaeche wie embed-facade
   -------------------------------------------------------------------------- */
.site-playlist__title {
    margin-bottom: 1rem;
    text-align: center;
}

.site-playlist__frame {
    max-width: 48rem;
    margin: 0 auto;
}

.site-playlist__iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 12px;
}

.site-playlist__placeholder {
    min-height: 260px;
    border-radius: var(--x-radius);
    border-color: var(--x-line);
    background: var(--x-surface-quiet);
    color: var(--x-ink);
}

.site-playlist__icon {
    color: #1db954;
}

.site-playlist__link {
    margin: .75rem 0 0;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Anderer Ticketshop (FE_Tickets ohne pretix) - Flaeche wie embed-facade,
   der Shop braucht Hoehe, sonst scrollt man im Rahmen.
   -------------------------------------------------------------------------- */
.site-ticketshop__iframe {
    display: block;
    width: 100%;
    height: 85vh;
    min-height: 640px;
    border: 0;
    border-radius: var(--x-radius);
    background: #fff;
}

.site-ticketshop__placeholder {
    min-height: 260px;
    border-radius: var(--x-radius);
    border-color: var(--x-line);
    background: var(--x-surface-quiet);
    color: var(--x-ink);
}

.site-ticketshop__link {
    margin: .75rem 0 0;
    text-align: center;
}

/* Mobil: Bild links klein, Text rechts - sonst wird die Wand endlos. */
@media (max-width: 575.98px) {
    .history-poster {
        flex-direction: row;
    }

    .history-poster__visual {
        flex: 0 0 6.5rem;
        aspect-ratio: auto;
        min-height: 7rem;
        padding: .5rem;
    }

    .history-poster__bigyear {
        font-size: 1.9rem;
    }

    .history-poster__visual:not(.is-type) .history-poster__year {
        left: .35rem;
        top: .35rem;
        font-size: .75rem;
    }

    .history-poster__body {
        padding: .75rem .9rem;
        min-width: 0;
    }
}
/* Dunkel: --fest-primary-ink ist bei dunklen Markenfarben zu dunkel fuer
   die Link-Pillen - auf der Plakatwand dann in Schriftfarbe. */
html[data-bs-theme="dark"] .history-poster .festival-history__link {
    border-color: var(--x-ink);
    color: var(--x-ink);
}

html[data-bs-theme="dark"] .history-poster .festival-history__link:hover,
html[data-bs-theme="dark"] .history-poster .festival-history__link:focus-visible {
    background: var(--x-ink);
    color: var(--x-surface);
}

html[data-bs-theme="dark"] .site-facts__value,
html[data-bs-theme="dark"] .site-moment__next {
    color: var(--x-ink);
}
