/*
 * Standby-Rotation auf dem Beamer.
 *
 * Alle Größen hängen an --ic-fs statt direkt an --presenter-font-size: das ist die
 * Liedtext-Größe aus den Einstellungen mal --ic-scale, und diesen Faktor dreht infoscreen.js
 * herunter, wenn eine Karte sonst nicht in die Fläche passt.
 */

.infoscreen {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: var(--presenter-bg, #000);
    color: var(--presenter-fg, #fff);
    opacity: 1;
    transition: opacity 0.4s ease;
}

.infoscreen.ic-fading { opacity: 0; }

.ic-card {
    --ic-fs: calc(var(--presenter-font-size) * var(--ic-scale, 1));

    height: 100vh;
    width: 100vw;
    display: grid;
    /* minmax(0, …) statt 1fr: sonst wächst die Zeile über die Karte hinaus und die Fußzeile
       mit dem QR-Code rutscht aus dem Bild. */
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 5vh 6vw;
    gap: 3vh;
    overflow: hidden;
}

.ic-card-image {
    padding: 0;
    display: block;
    background-color: #000;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.ic-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
}

.ic-fit { width: 100%; }

.ic-body-text .ic-fit {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2.5vh;
}

.ic-headline {
    font-size: calc(var(--ic-fs) * 1.1);
    font-weight: 700;
    line-height: 1.1;
}

.ic-subline {
    font-size: calc(var(--ic-fs) * 0.55);
    font-weight: 400;
    line-height: 1.25;
    color: var(--presenter-fg-next, #ccc);
}

.ic-events-headline {
    font-size: calc(var(--ic-fs) * 0.45);
    font-weight: 500;
    letter-spacing: 0.04em;
    opacity: 0.6;
    margin-bottom: 3.5vh;
}

.ic-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4vh;
}

.ic-event {
    display: flex;
    gap: 3vw;
}

/* Datum, Uhrzeit und Kalender stehen als Block links — der Titel bekommt dadurch die
   ganze Restbreite und muss nicht umbrechen. */
.ic-event-when {
    flex: 0 0 22%;
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
    color: var(--presenter-fg-next, #ccc);
    white-space: nowrap;
}

.ic-event-date {
    font-size: calc(var(--ic-fs) * 0.48);
    font-weight: 600;
    line-height: 1.1;
}

.ic-event-time {
    font-size: calc(var(--ic-fs) * 0.36);
    font-weight: 500;
}

.ic-event-cal {
    font-size: calc(var(--ic-fs) * 0.26);
    opacity: 0.65;
}

.ic-event-main {
    display: flex;
    flex-direction: column;
    gap: 1vh;
    min-width: 0;
}

.ic-event-name {
    font-size: calc(var(--ic-fs) * 0.58);
    font-weight: 600;
    line-height: 1.1;
}

.ic-event-details {
    display: flex;
    flex-direction: column;
    gap: 0.4vh;
}

.ic-event-detail {
    font-size: calc(var(--ic-fs) * 0.32);
    line-height: 1.3;
    color: var(--presenter-fg-next, #ccc);
}

/* Fußzeile mit dem Mitlese-Link; auf der Begrüßungs-/Abschiedskarte deutlich größer. */
.ic-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2vw;
}

.ic-qr {
    flex: 0 0 auto;
    width: calc(var(--ic-fs) * 1.2);
    height: calc(var(--ic-fs) * 1.2);
    padding: 0.5vh;
    background: #fff;
    border-radius: 6px;
}

.ic-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.ic-qr-text {
    display: flex;
    flex-direction: column;
    gap: 0.6vh;
    text-align: left;
}

.ic-qr-label {
    font-size: calc(var(--ic-fs) * 0.28);
    opacity: 0.7;
}

.ic-qr-url {
    font-size: calc(var(--ic-fs) * 0.34);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.ic-footer-large { gap: 3vw; }
.ic-footer-large .ic-qr {
    width: calc(var(--ic-fs) * 2.3);
    height: calc(var(--ic-fs) * 2.3);
    padding: 1vh;
    border-radius: 12px;
}
.ic-footer-large .ic-qr-label { font-size: calc(var(--ic-fs) * 0.36); }
.ic-footer-large .ic-qr-url { font-size: calc(var(--ic-fs) * 0.46); }

@media (prefers-reduced-motion: reduce) {
    .infoscreen { transition: none; }
}
