/* assets/css/monitor.css — Kiosk-Vollbild-Styles für die Saal-Monitore */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #0a0a0a;
    color: #fff;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Wrapper: Vollbild-Flex-Spalte ───────────────────────────────────────── */

#tm-wrapper {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

#tm-header {
    flex: 0 0 auto;
    height: 80px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 20px;
    background: #111;
    border-bottom: 3px solid #ad2121;
}

#tm-header.tm-hidden {
    height: 0;
    opacity: 0;
}

#tm-header-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

#tm-header-logo img {
    height: 54px;
    width: auto;
    display: block;
    object-fit: contain;
}

#tm-header-text {
    flex: 1 1 auto;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tm-header-uhrzeit {
    flex: 0 0 auto;
    text-align: right;
    line-height: 1;
}

#tm-header-zeit {
    font-size: 38px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

#tm-header-datum {
    font-size: 13px;
    opacity: 0.75;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

/* ── Hauptfläche ─────────────────────────────────────────────────────────── */

#tm-main {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

/* Fallback: kein Programm */
.tm-main-leer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 18px;
    opacity: 0.2;
}

/* ── Layout-Grid (tm-layout) ─────────────────────────────────────────────── */

.tm-layout {
    display: grid;
    width: 100%;
    height: 100%;
}

.tm-spalte {
    position: relative;
    overflow: hidden;
    height: 100%;
    container-type: inline-size; /* Container Queries für Inhalte */
}

/* Einzelne Modul-Instanz füllt die Spalte */
.tm-modul-container {
    position: absolute;
    inset: 0;
}

/* ── Footer / Ticker ─────────────────────────────────────────────────────── */

#tm-footer {
    flex: 0 0 auto;
    height: 70px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 28px;
    background: #ad2121;
    position: relative;
}

#tm-footer.tm-hidden {
    height: 0;
}

.tm-ticker-text {
    position: relative;
    white-space: nowrap;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 0.01em;
    will-change: transform, opacity;
}

#tm-footer.tm-ticker-zentriert {
    justify-content: center;
}

/* ── Module: uhrzeit ─────────────────────────────────────────────────────── */

.tm-modul-uhrzeit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.tm-uhrzeit-zeit {
    font-size: 120px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.tm-uhrzeit-datum {
    font-size: 32px;
    opacity: 0.8;
    margin-top: 8px;
    font-variant-numeric: tabular-nums;
}

/* ── Module: bild ────────────────────────────────────────────────────────── */

.tm-modul-bild {
    width: 100%;
    height: 100%;
}

.tm-bild-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tm-bild-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.tm-bild-leer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.4;
    font-size: 18px;
}

/* ── Module: ankuendigung ────────────────────────────────────────────────── */

.tm-modul-ankuendigung {
    width: 100%;
    height: 100%;
}

.tm-ank-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tm-ank-slide {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.tm-ank-bild img {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    display: block;
}

.tm-ank-text {
    font-size: 2em;
    font-weight: 600;
    line-height: 1.25;
}

.tm-ank-leer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.4;
    font-size: 18px;
}

/* ── Module: stundenplan ─────────────────────────────────────────────────── */

.tm-modul-stundenplan {
    padding: 20px 24px;
    overflow: hidden;
    height: 100%;
}

.tm-sp-heading {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ad2121;
    flex-shrink: 0;
    text-align: center;
    margin-bottom: 12px;
}

.tm-sp-status {
    opacity: 0.6;
    font-size: 18px;
}

.tm-sp-fehler {
    color: #ff8080;
}

.tm-sp-cards {
    display: flex;
    flex-direction: column;
    gap: 7px;
    height: 100%;
}

.tm-sp-card {
    display: grid;
    grid-template-columns: 110px 100px 1fr 160px;
    gap: 12px;
    align-items: center;
    flex: 1;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border-left: 5px solid transparent;
    font-size: 32px;
    overflow: hidden;
}

/* 3-Spalten-Bereich (< ~700 px Spaltenbreite): Schriften + Grid verkleinern.
   1-Spalte (~1920 px) und 2-Spalten (~960 px / ~768 px) bleiben unverändert. */
@container (max-width: 700px) {
    .tm-modul-stundenplan { padding: 12px 16px; }
    .tm-sp-cards          { gap: 5px; }
    .tm-sp-card {
        grid-template-columns: 80px 70px 1fr 115px;
        gap: 8px;
        padding: 6px 14px;
        font-size: 22px;
    }
    .tm-sp-lehrer { font-size: 15px; }
    .tm-sp-status { font-size: 15px; }
}

.tm-sp-card--aktuell {
    background: rgba(255, 255, 255, 0.22);
    border-left-color: #ad2121;
    box-shadow: 0 0 24px rgba(173, 33, 33, 0.25);
}

.tm-sp-card--aktuell .tm-sp-zeit::before {
    content: '▶ ';
    color: #ff5555;
}

.tm-sp-zeit {
    color: #ad2121;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.tm-sp-saal {
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-sp-kurs {
    font-weight: 600;
    overflow: hidden;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tm-sp-lehrer {
    opacity: 0.65;
    font-size: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

/* ── Module: veranstaltung ───────────────────────────────────────────────── */

.tm-modul-veranstaltung {
    width: 100%;
    height: 100%;
}

.tm-va-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tm-va-slide {
    display: flex;
    flex-direction: column;
}

.tm-va-bild {
    flex: 0 0 55%;
    overflow: hidden;
}

.tm-va-bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.tm-va-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 32px;
    background: rgba(0, 0, 0, 0.55);
    gap: 6px;
    overflow: hidden;
}

.tm-va-info--keinbild {
    flex: 1 1 100%;
    justify-content: center;
    padding: 40px 48px;
    background: transparent;
    gap: 12px;
}

.tm-va-datum {
    font-size: 22px;
    font-weight: 500;
    color: #ad2121;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tm-va-uhrzeit {
    font-size: 20px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.tm-va-titel {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tm-va-info--keinbild .tm-va-titel {
    font-size: 52px;
}

.tm-va-venue {
    font-size: 20px;
    opacity: 0.65;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tm-va-status,
.tm-va-leer {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.5;
    font-size: 18px;
}

.tm-va-fehler {
    color: #ff8080;
    opacity: 1;
}

/* ── Module: fret (Song-Anzeige) ─────────────────────────────────────────── */

.tm-modul-fret {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow: hidden;
}

.tm-song-heading {
    font-size: 32px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ad2121;
    flex-shrink: 0;
}

.tm-song-status {
    opacity: 0.6;
    font-size: 18px;
}

.tm-song-titel {
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.tm-song-artist {
    font-size: 36px;
    font-weight: 300;
    color: #bbb;
}

.tm-song-badges,
.tm-song-k-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
    align-items: center;
}

.tm-song-badge {
    display: inline-block;
    font-size: 40px;
    font-weight: 500;
    border-radius: 8px;
    padding: 6px 18px;
}

.tm-song-badge-main {
    background: #ad2121;
    color: #fff;
}

.tm-song-badge-sub {
    background: #f0f0f0;
    color: #ad2121;
    border: 2px solid #ad2121;
    font-size: 28px;
    padding: 4px 12px;
}

.tm-song-progress {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.tm-song-progress-bar {
    height: 100%;
    width: 0;
    background: #ad2121;
    border-radius: 5px;
    transition: width 1s linear;
}

.tm-song-label {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888;
    padding-left: 2px;
    flex-shrink: 0;
}

.tm-song-kommende-liste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tm-song-kommende-eintrag {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.tm-song-k-info {
    flex: 1;
}

.tm-song-k-titel {
    font-size: 28px;
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 2px;
}

.tm-song-k-artist {
    font-size: 22px;
    color: #888;
    margin-bottom: 6px;
}

.tm-song-kommende .tm-song-badge {
    font-size: 26px;
    padding: 4px 10px;
    border-radius: 5px;
}

.tm-song-kommende .tm-song-badge-sub {
    border-width: 1.5px;
    font-size: 20px;
}

.tm-song-k-countdown {
    font-size: 22px;
    color: #888;
    min-width: 180px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}
