/*
 * Öffentliche Bandseite: drei Layouts zur Wahl der Band.
 * Markup: views/bands/public-layouts/{feinschliff,buehne,pressemappe}.php
 *
 * Gemeinsame Bausteine (Tracks, Termine, Downloads, Mitglieder) lesen ihre
 * Farben aus den --bpl-* Variablen, die jedes Layout am <body> setzt.
 */

.public-band {
    --bpl-brand-1: #667eea;
    --bpl-brand-2: #764ba2;
    --bpl-text: var(--bs-body-color);
    --bpl-muted: var(--bs-secondary-color);
    --bpl-border: var(--bs-border-color);
    --bpl-surface: var(--bs-body-bg);
    --bpl-surface-2: var(--bs-light);
    --bpl-accent: var(--bpl-brand-2);
}

.public-band--feinschliff,
.public-band--pressemappe {
    background-color: var(--bs-light);
}

/* ---------- Gemeinsame Bausteine ---------- */

.bpl-pre-line { white-space: pre-line; }
.min-w-0 { min-width: 0; }

.bpl-backlink {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
}
.bpl-backlink:hover { color: #fff; }

/* Bandfoto als Hintergrund: als <img>, damit kein Inline-Style nötig ist */
.bpl-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    z-index: 0;
}

.bpl-logo {
    width: 104px;
    height: 104px;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, .85);
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .2);
}
.bpl-logo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 2.5rem;
}

.bpl-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    color: rgba(255, 255, 255, .85);
}
.bpl-facts i { opacity: .75; margin-right: .35rem; }

.bpl-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bpl-share-qr {
    width: 180px;
    max-width: 100%;
    height: auto;
}

/* Fotos */
.bpl-photo-link {
    position: relative;
    display: block;
    height: 100%;
    border-radius: .5rem;
    overflow: hidden;
}
.bpl-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.bpl-photo-link:hover .bpl-photo { transform: scale(1.03); }

/* Demo-Tracks */
.bpl-tracks {
    list-style: none;
    margin: 0;
    padding: 0;
}
.bpl-track {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    border-top: 1px solid var(--bpl-border);
    color: var(--bpl-text);
}
.bpl-track:first-child { border-top: 0; }
.bpl-track-no { width: 1.5rem; color: var(--bpl-muted); font-variant-numeric: tabular-nums; }
.bpl-track-title { flex: 1 1 auto; min-width: 0; }
.bpl-track-time { color: var(--bpl-muted); font-variant-numeric: tabular-nums; }
.bpl-track-play {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bpl-accent);
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
}
.bpl-track-play:hover { color: #fff; filter: brightness(1.1); }

/* Touren */
.bpl-tours { display: grid; gap: .5rem; }
.bpl-tour {
    display: flex;
    flex-direction: column;
    padding: .75rem 1rem;
    border: 1px solid var(--bpl-border);
    border-radius: .5rem;
    text-decoration: none;
    color: var(--bpl-text);
    background: var(--bpl-surface);
}
.bpl-tour:hover { border-color: var(--bpl-accent); color: var(--bpl-text); }
.bpl-tour-name { font-weight: 600; }
.bpl-tour-meta { font-size: .85rem; color: var(--bpl-muted); }

/* Mitglieder */
.bpl-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.bpl-member { display: flex; align-items: center; gap: .75rem; }
.bpl-member-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bpl-brand-1), var(--bpl-brand-2));
    color: #fff;
    font-weight: 700;
}
.bpl-member-name { display: block; font-weight: 600; color: var(--bpl-text); }
.bpl-member-role { display: block; font-size: .8rem; color: var(--bpl-muted); }

/* Downloads */
.bpl-doc-group + .bpl-doc-group { margin-top: 1rem; }
.bpl-doc-group-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bpl-muted);
    margin-bottom: .4rem;
}
.bpl-doc {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .8rem;
    margin-bottom: .4rem;
    border: 1px solid var(--bpl-border);
    border-radius: .5rem;
    text-decoration: none;
    color: var(--bpl-text);
    background: var(--bpl-surface);
}
.bpl-doc:hover { border-color: var(--bpl-accent); color: var(--bpl-text); }
.bpl-doc-icon { font-size: 1.4rem; color: var(--bpl-accent); flex: 0 0 auto; }
.bpl-doc-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: .35rem; flex: 0 0 auto; }
.bpl-doc-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.bpl-doc-name small { display: block; color: var(--bpl-muted); }
.bpl-doc-action { color: var(--bpl-muted); flex: 0 0 auto; }

/* Die alten Karten-Animationen der Profilseite nicht auf die neuen Layouts anwenden */
.public-band .card:hover { transform: none; }

/* ==========================================================================
   Layout A: Feinschliff
   ========================================================================== */

.bpl-a-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 1.5rem 0 2.25rem;
    background: linear-gradient(135deg, var(--bpl-brand-1) 0%, var(--bpl-brand-2) 100%);
}
.bpl-a-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, .9) 0%, rgba(118, 75, 162, .86) 100%);
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--bpl-brand-1) 90%, transparent) 0%,
        color-mix(in srgb, var(--bpl-brand-2) 86%, transparent) 100%);
}
.bpl-a-hero > .container { z-index: 1; }
.bpl-a-name {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0 0 .25rem;
    overflow-wrap: anywhere;
}
.bpl-a-cta { color: var(--bpl-brand-2); font-weight: 600; }
.bpl-a-cta:hover { color: var(--bpl-brand-2); }
.bpl-a-hero .btn-outline-light { border-color: rgba(255, 255, 255, .6); }

.bpl-a-photos {
    display: grid;
    gap: .5rem;
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
}
.bpl-a-photos--2 { grid-template-columns: 1fr 1fr; }
.bpl-a-photos--3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 170px 170px;
    grid-auto-rows: auto;
}
.bpl-a-photos--3 > :first-child { grid-row: 1 / span 2; }

.bpl-a-side-title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
    margin-bottom: 1rem;
}
.bpl-a-facts dt { font-weight: 500; font-size: .8rem; color: var(--bs-secondary-color); }
.bpl-a-facts dd { margin-bottom: .6rem; }

@media (min-width: 992px) {
    .bpl-a-side { position: sticky; top: 1rem; }
}

@media (max-width: 575.98px) {
    .bpl-logo { width: 72px; height: 72px; }
    .bpl-a-photos--3 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 210px 120px;
    }
    .bpl-a-photos--3 > :first-child { grid-row: auto; grid-column: 1 / span 2; }
}

/* ==========================================================================
   Layout B: Bühne
   ========================================================================== */

.public-band--buehne {
    --bpl-text: #f1eff7;
    --bpl-muted: #9c96ad;
    --bpl-border: rgba(255, 255, 255, .1);
    --bpl-surface: rgba(255, 255, 255, .03);
    --bpl-surface-2: rgba(255, 255, 255, .06);
    --bpl-accent: #8f7be8;
    background-color: #0f0e13;
    color: var(--bpl-text);
}

.bpl-b-hero {
    position: relative;
    overflow: hidden;
    min-height: min(78vh, 720px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 5rem 0 3rem;
    color: #fff;
    background: linear-gradient(135deg, #2a2440, #0f0e13);
}
.bpl-b-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(15, 14, 19, .25) 0%, rgba(15, 14, 19, .6) 55%, #0f0e13 100%);
}
.bpl-b-hero > .container { z-index: 1; }
.bpl-b-hero-top {
    position: absolute;
    top: 1.25rem;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.bpl-b-name {
    font-size: clamp(2.75rem, 10vw, 6.5rem);
    font-weight: 800;
    letter-spacing: .04em;
    line-height: .95;
    margin: 0;
    overflow-wrap: anywhere;
}
.bpl-b-meta { margin: 1rem 0 0; font-size: 1.1rem; color: #d3cce8; }
.bpl-b-genre {
    font-size: .75rem;
    font-weight: 600;
    padding: .25rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .6);
}
.bpl-b-genre.is-main { background: #fff; color: #0f0e13; border-color: #fff; }

.bpl-b-nav {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(15, 14, 19, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--bpl-border);
}
.bpl-b-nav .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.bpl-b-nav .nav-link { color: #bdb6d3; font-weight: 500; padding: .9rem 1rem; white-space: nowrap; }
.bpl-b-nav .nav-link:hover { color: #fff; }

.bpl-b-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    scroll-margin-top: 3.5rem;
}
.bpl-b-section--last { border-bottom: 0; }
.bpl-b-label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #a99be0;
    margin-bottom: 1.5rem;
}
.bpl-b-lead { font-size: 1.35rem; line-height: 1.55; color: #fff; }
.bpl-b-text { color: var(--bpl-muted); }

.bpl-b-player {
    border-radius: .75rem;
    background: linear-gradient(135deg, #2a2440, #1a1726);
    border: 1px solid var(--bpl-border);
    padding: .75rem 1.25rem;
}

.bpl-b-masonry { columns: 3 220px; column-gap: .75rem; }
.bpl-b-masonry .bpl-photo-link { margin-bottom: .75rem; break-inside: avoid; height: auto; }
.bpl-b-masonry .bpl-photo { height: auto; }

.bpl-b-booking {
    background: linear-gradient(135deg, var(--bpl-brand-1), var(--bpl-brand-2));
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
}
.bpl-b-docs {
    --bpl-text: #fff;
    --bpl-muted: rgba(255, 255, 255, .7);
    --bpl-border: rgba(255, 255, 255, .3);
    --bpl-surface: rgba(255, 255, 255, .08);
    --bpl-accent: #fff;
}

/* Konzert-Zeitstrahl (partials/public-concert-timeline.php) in dunklen Farben */
.public-band--buehne .concert-timeline {
    --tl-accent: #a99be0;
    --tl-accent-soft: rgba(169, 155, 224, .18);
    --tl-line-upcoming: rgba(169, 155, 224, .45);
    --tl-line-past: rgba(255, 255, 255, .14);
    --tl-muted: #9c96ad;
    background: transparent;
    box-shadow: none !important;
    color: var(--bpl-text);
}
.public-band--buehne .concert-timeline > .card-header {
    background: transparent !important;
    border-color: var(--bpl-border) !important;
    padding-inline: 0;
}
.public-band--buehne .concert-timeline .card-title { display: none; }
.public-band--buehne .concert-timeline-body { padding-inline: 0; }
.public-band--buehne .concert-timeline-filter {
    background: transparent;
    border-color: rgba(255, 255, 255, .3);
    color: #d8d3e6;
}
.public-band--buehne .concert-timeline-filter.active {
    background: var(--tl-accent);
    border-color: var(--tl-accent);
    color: #0f0e13;
}
.public-band--buehne .concert-timeline .text-muted { color: var(--tl-muted) !important; }
.public-band--buehne .concert-timeline-day { color: #d8d3e6; }
.public-band--buehne .concert-timeline-item--upcoming .concert-timeline-day { color: #fff; }
.public-band--buehne .concert-timeline-item--upcoming .concert-timeline-card {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(169, 155, 224, .3);
}
.public-band--buehne .concert-timeline-title { color: #f1eff7; }
.public-band--buehne .concert-timeline-item--upcoming .concert-timeline-title { color: #fff; }
.public-band--buehne .concert-timeline-item--upcoming .concert-timeline-venue { color: #d8d3e6; }
.public-band--buehne .concert-timeline-marker::after {
    background: #0f0e13;
    border-color: #6c6680;
}
.public-band--buehne .concert-timeline-item--upcoming .concert-timeline-marker::after { background: var(--tl-accent); }
.public-band--buehne .concert-timeline-year-label { color: #bdb6d3; }
.public-band--buehne .concert-timeline-year .concert-timeline-marker::after { background: #6c6680; }
.public-band--buehne .concert-timeline-today-label { color: #ff7b86; }
.public-band--buehne .concert-timeline-role { background: rgba(255, 255, 255, .1); color: #d8d3e6; }
.public-band--buehne .concert-timeline-toggle {
    color: #d8d3e6;
    border-color: rgba(255, 255, 255, .3);
}
.public-band--buehne .concert-timeline-toggle:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.public-band--buehne .is-cancelled .concert-timeline-title { color: #6c6680; }
.public-band--buehne .concert-timeline-item--upcoming.is-cancelled .concert-timeline-card {
    background: transparent;
    border-color: rgba(255, 255, 255, .1);
}
.public-band.public-band--buehne.has-band-colors .concert-timeline {
    --tl-accent: color-mix(in srgb, var(--bpl-brand-1) 55%, #fff);
    --tl-accent-soft: color-mix(in srgb, var(--bpl-brand-1) 22%, transparent);
    --tl-line-upcoming: color-mix(in srgb, var(--bpl-brand-1) 50%, transparent);
}

@media (max-width: 575.98px) {
    .bpl-b-hero { padding-top: 4.5rem; }
    .bpl-b-section { padding: 2.5rem 0; }
    .bpl-b-booking { padding: 1.5rem; }
}

/* ==========================================================================
   Layout C: Pressemappe
   ========================================================================== */

.bpl-c-head {
    color: #fff;
    padding: 1.5rem 0 1.75rem;
    background: linear-gradient(135deg, var(--bpl-brand-1), var(--bpl-brand-2));
}
.bpl-c-kicker {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .7);
}
.bpl-c-name { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.bpl-c-genres { color: rgba(255, 255, 255, .8); }

.bpl-c-fact {
    height: 100%;
    padding: 1rem;
    border-radius: .75rem;
    background: #fff;
    border: 1px solid var(--bs-border-color-translucent);
}
.bpl-c-fact-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
}
.bpl-c-fact-value { font-size: 1.1rem; font-weight: 600; }

.bpl-c-venues { display: flex; flex-wrap: wrap; gap: .4rem; }
.bpl-c-venues span {
    font-size: .85rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background: #fff;
}
.bpl-c-venues .is-more { color: var(--bs-secondary-color); }

.bpl-c-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}
.bpl-c-photos .bpl-photo-link { aspect-ratio: 1 / 1; height: auto; }

/* ==========================================================================
   Musik-Player (partials/music-embed.php, public-band-embed.js)
   ========================================================================== */

.bpl-embed {
    border-radius: .75rem;
    overflow: hidden;
    background: var(--bpl-surface-2);
    border: 1px solid var(--bpl-border);
}
.bpl-embed iframe {
    display: block;
    width: 100%;
    border: 0;
}
.bpl-embed--compact iframe { height: 152px; }
.bpl-embed--tall iframe { height: 352px; }
.bpl-embed--video iframe { height: auto; aspect-ratio: 16 / 9; }
.bpl-embed--soundcloud.bpl-embed--compact iframe { height: 166px; }
.bpl-embed--soundcloud.bpl-embed--tall iframe { height: 400px; }
.bpl-embed--bandcamp iframe { height: 120px; }
/* Spotify bringt eigene Ecken und Farben mit - der Rahmen nur um den Platzhalter */
.bpl-embed--spotify:has(iframe) { border: 0; background: transparent; }

.bpl-embed-consent {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--bpl-text);
}
.bpl-embed-consent-icon { font-size: 2rem; color: var(--bpl-accent); flex: 0 0 auto; }
.bpl-embed-consent-text { flex: 1 1 auto; min-width: 0; }
.bpl-embed-consent-text .small { color: var(--bpl-muted); }
.bpl-embed-consent-text a { color: inherit; }
.bpl-embed-load {
    flex: 0 0 auto;
    background: var(--bpl-accent);
    border-color: var(--bpl-accent);
    color: #fff;
}
.bpl-embed-load:hover { color: #fff; filter: brightness(1.1); }

@media (max-width: 575.98px) {
    .bpl-embed-consent { flex-wrap: wrap; }
    .bpl-embed-load { width: 100%; }
}

/* ==========================================================================
   Bandfarben (has-band-colors, Werte aus /band-theme.php)
   ========================================================================== */

.public-band.has-band-colors .btn-primary {
    --bs-btn-bg: var(--bpl-brand-1);
    --bs-btn-border-color: var(--bpl-brand-1);
    --bs-btn-hover-bg: var(--bpl-brand-2);
    --bs-btn-hover-border-color: var(--bpl-brand-2);
    --bs-btn-active-bg: var(--bpl-brand-2);
    --bs-btn-active-border-color: var(--bpl-brand-2);
}
.public-band.has-band-colors .concert-timeline {
    --tl-accent: var(--bpl-brand-1);
    --tl-accent-soft: color-mix(in srgb, var(--bpl-brand-1) 12%, #fff);
    --tl-line-upcoming: color-mix(in srgb, var(--bpl-brand-1) 30%, #fff);
}
.public-band--buehne.has-band-colors {
    --bpl-accent: color-mix(in srgb, var(--bpl-brand-1) 65%, #fff);
}
.public-band--buehne.has-band-colors .bpl-b-label {
    color: color-mix(in srgb, var(--bpl-brand-1) 55%, #fff);
}
.public-band--buehne.has-band-colors .bpl-b-player {
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--bpl-brand-2) 35%, #0f0e13),
        #1a1726);
}

/* ==========================================================================
   Booking: Rahmendaten (partials/booking-details.php) und Anfrageformular
   (partials/booking-modal.php) - für alle Layouts
   ========================================================================== */

.bpl-booking-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .5rem 1rem;
    margin: 0;
}
.bpl-booking-detail { min-width: 0; }
.bpl-booking-details dt {
    font-weight: 500;
    font-size: .8rem;
    color: var(--bpl-muted);
}
.bpl-booking-details dd {
    margin: 0;
    color: var(--bpl-text);
    overflow-wrap: anywhere;
}

/* Fenster sind immer hell - auch im dunklen Layout "Bühne" */
.public-band .modal-content {
    --bpl-text: var(--bs-body-color);
    --bpl-muted: var(--bs-secondary-color);
    --bpl-border: var(--bs-border-color);
    --bpl-surface: var(--bs-body-bg);
    color: var(--bs-body-color);
}

.bpl-booking-summary {
    padding: .75rem 1rem;
    border-radius: .5rem;
    background: var(--bs-light);
}

/* Honeypot gegen Spam-Bots: aus dem Bild, aber nicht display:none */
.bpl-booking-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.bpl-b-booking .bpl-booking-details {
    --bpl-text: #fff;
    --bpl-muted: rgba(255, 255, 255, .75);
}

/* Schriftzug statt Logo (Einstellung in der Bandansicht) */
.bpl-wordmark { display: block; max-height: 88px; max-width: min(360px, 60vw); width: auto; height: auto; object-fit: contain; }
.bpl-b-name--wordmark { line-height: 1; }
.bpl-wordmark--stage { max-height: clamp(90px, 18vw, 200px); max-width: min(900px, 92vw); }
