/*
 * em-timetable.css – Event-Management Timetable Embed
 * Lineup-Karten-Layout
 *
 * CSS-Variablen zur Anpassung (auf .em-timetable-wrap setzen):
 *   --em-tt-accent      Akzentfarbe       (Standard: lebendiges Rot)
 *   --em-tt-dark        Dunkelfarbe       (Karten-Hintergrund)
 *   --em-tt-bg          Seitenhintergrund (transparent)
 *   --em-tt-card-bg     Karten-Innenfarbe
 *   --em-tt-radius      Ecken-Radius
 *   --em-tt-font        Schriftart
 */

/* ══ Reset & Variablen ═══════════════════════════════════════════ */
.em-timetable-wrap {
    --em-tt-accent:   #CA0738;
    --em-tt-dark:     #d0d0d0;
    --em-tt-bg:       rga(0,0,0,0);
    --em-tt-card-bg:  #eaeaea;
    --em-tt-border:   #2a2a2a;
    --em-tt-text:     #2a2a2a;
    --em-tt-muted:    #666;
    --em-tt-radius:   14px;
    --em-tt-font:     'Nunito Sans', 'Segoe UI', Arial, sans-serif;

    font-family: var(--em-tt-font);
    line-height: 1.5;
    color: var(--em-tt-text);
    -webkit-font-smoothing: antialiased;
    background: var(--em-tt-bg);
}

.em-tt-root {
    max-width: 100%;
}

/* ══ Header ══════════════════════════════════════════════════════ */
.em-tt-header {
    margin-bottom: 28px;
    text-align: center;
    display: none;
}

.em-tt-event-name {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: var(--em-tt-text);
}

.em-tt-event-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--em-tt-muted);
    margin: 0;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ══ Lade- / Fehlerzustände ══════════════════════════════════════ */
.em-tt-loading,
.em-tt-empty,
.em-tt-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    font-size: 0.95rem;
    color: var(--em-tt-muted);
    background: var(--em-tt-card-bg);
    border: 1px solid var(--em-tt-border);
    border-radius: var(--em-tt-radius);
}

.em-tt-error { color: #e86060; }

.em-tt-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.15);
    border-top-color: var(--em-tt-accent);
    border-radius: 50%;
    animation: em-tt-spin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes em-tt-spin { to { transform: rotate(360deg); } }

/* ══ Venue-Grid ══════════════════════════════════════════════════ */
.em-tt-venues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ══ Venue-Karte ═════════════════════════════════════════════════ */
.em-tt-venue-card {
    background: var(--em-tt-card-bg);
    border-radius: var(--em-tt-radius);
    overflow: hidden;
    border: 1px solid var(--em-tt-border);
}

.em-tt-venue-header {
    background: var(--em-tt-dark);
    padding: 14px 18px 12px;
    border-bottom: 2px solid var(--em-tt-accent);
}

.em-tt-venue-name {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--em-tt-text);
}

/* ══ Band-Liste ══════════════════════════════════════════════════ */
.em-tt-band-list {
    padding: 6px 0;
}

/* ══ Band-Eintrag ════════════════════════════════════════════════ */
.em-tt-band-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--em-tt-border);
    transition: background .15s;
    cursor: default;
}

.em-tt-band-item:last-child {
    border-bottom: none;
}

.em-tt-band-clickable {
    cursor: pointer;
}

.em-tt-band-clickable:hover {
    background: rgba(255,255,255,.05);
}

.em-tt-band-clickable:hover .em-tt-band-arrow {
    transform: translateX(3px);
    color: var(--em-tt-accent);
}

/* ── Band-Bild ───────────────────────────────────────────────── */
.em-tt-band-img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--em-tt-dark);
    display: block;
}

.em-tt-band-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--em-tt-muted);
}

/* ── Band-Info ───────────────────────────────────────────────── */
.em-tt-band-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.em-tt-band-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--em-tt-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.em-tt-band-time {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--em-tt-accent);
    letter-spacing: .02em;
}

/* ── Pfeil ───────────────────────────────────────────────────── */
.em-tt-band-arrow {
    font-size: 1.3rem;
    color: var(--em-tt-muted);
    flex-shrink: 0;
    line-height: 1;
    transition: transform .15s, color .15s;
    margin-left: auto;
    padding-left: 4px;
}

/* ══ Modal-Overlay ═══════════════════════════════════════════════ */
.em-tt-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overscroll-behavior: contain;
}

.em-tt-modal-open {
    display: flex;
}

/* ── Modal-Box ───────────────────────────────────────────────── */
.em-tt-modal-box {
    position: relative;
    background: var(--em-tt-card-bg, #1d2232);
    border-radius: var(--em-tt-radius, 14px);
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0,0,0,.5);
    border: 1px solid rgba(255,255,255,.1);
    color: #f0f2f7;
    font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    -webkit-overflow-scrolling: touch;
}

/* ── Schließen-Button ────────────────────────────────────────── */
.em-tt-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

.em-tt-modal-close:hover {
    background: rgba(255,255,255,.22);
}

/* ── Feature-Bild ────────────────────────────────────────────── */
.em-tt-modal-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--em-tt-radius, 14px) var(--em-tt-radius, 14px) 0 0;
    background: #111;
}

.em-tt-modal-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Modal-Inhalt ────────────────────────────────────────────── */
.em-tt-modal-body {
    padding: 22px 24px 28px;
}

.em-tt-modal-name {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: #fff;
}

.em-tt-modal-meta {
    font-size: 0.83rem;
    font-weight: 600;
    color: #e8233a;
    margin: 0 0 16px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.em-tt-modal-press {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(240,242,247,.80);
    white-space: pre-line;
}

/* ══ Responsive ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .em-tt-venues-grid {
        grid-template-columns: 1fr;
    }

    .em-tt-band-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .em-tt-band-img {
        width: 40px;
        height: 40px;
    }

    .em-tt-modal-body {
        padding: 18px 18px 24px;
    }

    .em-tt-modal-name {
        font-size: 1.2rem;
    }
}

@media (min-width: 900px) {
    .em-tt-venues-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}
