/* ==============================================================
   FAHRTENBUCH - Gestaltung

   In dieser Datei steht KEINE einzige Farbe und KEINE Schrift
   direkt drin. Alles kommt aus inc/design.php.

   Wenn du etwas am Aussehen aendern willst: dort nachsehen,
   nicht hier. Diese Datei regelt nur, WO etwas sitzt.
   ============================================================== */

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

html { -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--grund);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: var(--textgroesse);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--akzent); }

/* --------------------------------------------------------------
   KOPFZEILE
   -------------------------------------------------------------- */

.kopf {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.05rem 1.6rem;
    background: var(--flaeche);
    border-bottom: 1px solid var(--linie);
}

.kopf__marke {
    font-family: var(--schrift-anzeige);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.kopf__strich {
    flex: 1;
    height: 1px;
    background: var(--linie);
}

.kopf__navi {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: .84rem;
}

.kopf__person { color: var(--gedimmt); }

.kopf__navi a {
    color: var(--gedimmt);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.kopf__navi a:hover { color: var(--akzent); border-bottom-color: var(--akzent); }

/* --------------------------------------------------------------
   STARTSEITE - Raster

   Ab 860 Pixel Breite stehen Bild und Anmeldung nebeneinander.
   Darunter untereinander, Bild zuerst.
   -------------------------------------------------------------- */

.start {
    flex: 1;
    width: 100%;
    max-width: var(--inhaltsbreite);
    margin: 0 auto;
    padding: 2.2rem 1.5rem 3.4rem;
    display: grid;
    gap: 2rem;
    align-items: start;
    justify-items: center;
}

.start--einspaltig { max-width: var(--formularbreite); }

.start__bild  { width: 100%; max-width: 340px; }
.start__spalte {
    width: 100%;
    max-width: var(--formularbreite);
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

@media (min-width: 860px) {
    .start:not(.start--einspaltig) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: center;
        padding-top: 3rem;
    }
    .start__bild { max-width: 420px; justify-self: end; }
    .start__spalte { justify-self: start; }
}

/* --------------------------------------------------------------
   BILDBEREICH
   -------------------------------------------------------------- */

.buehne {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--flaeche-tief);
    border: 1px solid var(--linie);
    border-radius: var(--radius);

    /* Die Hoehe folgt dem Seitenverhaeltnis des Bildes, damit nichts
       abgeschnitten wird. Der Wert steht in inc/design.php. */
    aspect-ratio: var(--bildverhaeltnis);
}

/* Bild als durchgehendes Band: keine Rundung, volle Breite,
   Hoehe nach oben begrenzt. */
.buehne--breit {
    border: 0;
    border-bottom: 1px solid var(--linie);
    border-radius: 0;
    max-height: var(--bildmaxhoehe);
}


.buehne__bild {
    display: block;
    width: 100%;
    height: 100%;

    /* Kommt aus inc/design.php - dort umstellbar zwischen
       contain (ganz sichtbar) und cover (fuellt, schneidet an). */
    object-fit: var(--bildfuellung);
    object-position: center;
}

.buehne__leer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    text-align: center;
    color: var(--gedimmt);
    font-size: .87rem;
    line-height: 1.5;
}

/* --------------------------------------------------------------
   INHALTSBEREICH
   -------------------------------------------------------------- */

.inhalt {
    flex: 1;
    width: 100%;
    max-width: var(--formularbreite);
    margin: 0 auto;
    padding: 2.6rem 1.5rem 3.6rem;
}

.inhalt--breit { max-width: var(--inhaltsbreite); }

.block + .block { margin-top: 2.8rem; }

.block__schild {
    font-family: var(--schrift-anzeige);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gedimmt);
    padding-bottom: .55rem;
    margin-bottom: 1.4rem;
    border-bottom: 1px solid var(--linie);
}

.block__notiz {
    font-size: .85rem;
    color: var(--gedimmt);
    margin-bottom: 1rem;
}

/* --------------------------------------------------------------
   FORMULAR
   -------------------------------------------------------------- */

.feld + .feld { margin-top: 1.05rem; }

.feld label {
    display: block;
    font-family: var(--schrift-anzeige);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gedimmt);
    margin-bottom: .4rem;
}

.feld input,
.feld textarea {
    width: 100%;
    padding: .74rem .9rem;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: 1rem;
}

.feld input:focus,
.feld textarea:focus {
    outline: none;
    border-color: var(--akzent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 20%, transparent);
}

.knopf {
    display: inline-block;
    width: 100%;
    margin-top: 1.5rem;
    padding: .82rem 1.1rem;
    background: var(--akzent);
    color: var(--akzent-text);
    border: 1px solid var(--akzent);
    border-radius: var(--radius);
    font-family: var(--schrift-anzeige);
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s;
}

.knopf:hover { filter: brightness(1.12); }

.knopf:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* --------------------------------------------------------------
   MELDUNGEN
   -------------------------------------------------------------- */

.meldung {
    padding: .75rem .95rem;
    margin-bottom: 1.4rem;
    border-radius: var(--radius);
    border-left: 3px solid;
    font-size: .89rem;
}

.meldung--fehler {
    border-color: var(--warnung);
    color: var(--warnung);
    background: color-mix(in srgb, var(--warnung) 9%, transparent);
}

.meldung--hinweis {
    border-color: var(--akzent);
    color: var(--text);
    background: color-mix(in srgb, var(--akzent) 9%, transparent);
}

/* --------------------------------------------------------------
   TABELLE
   -------------------------------------------------------------- */

.tabelle {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.tabelle th {
    font-family: var(--schrift-anzeige);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gedimmt);
    text-align: left;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--linie);
}

.tabelle td {
    padding: .66rem .75rem;
    border-bottom: 1px solid var(--linie);
}

.tabelle tr:last-child td { border-bottom: 0; }

.tabelle .zahl {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.leerzustand {
    padding: 2.4rem 1.2rem;
    text-align: center;
    color: var(--gedimmt);
    font-size: .9rem;
    background: var(--flaeche);
    border: 1px dashed var(--linie);
    border-radius: var(--radius);
}

.codeblock {
    width: 100%;
    padding: .85rem;
    background: var(--flaeche-tief);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    color: var(--text);
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: .78rem;
    line-height: 1.5;
    resize: vertical;
}

/* --------------------------------------------------------------
   FUSSZEILE
   -------------------------------------------------------------- */

.fuss {
    padding: 1.5rem;
    border-top: 1px solid var(--linie);
    color: var(--gedimmt);
    font-size: .76rem;
    text-align: center;
}

.fuss__punkt { margin: 0 .45rem; }

/* --------------------------------------------------------------
   KLEINE BILDSCHIRME
   -------------------------------------------------------------- */

@media (max-width: 480px) {
    .buehne { max-height: 40vh; }
    .start__bild   { max-width: 300px; }
    .inhalt { padding: 2rem 1.15rem 2.8rem; }
    .start  { padding: 1.8rem 1.15rem 2.6rem; }
    .kopf   { padding: .95rem 1.15rem; }
}

/* --------------------------------------------------------------
   WETTERBAND
   -------------------------------------------------------------- */

.wetter {
    width: 100%;
    max-width: var(--formularbreite);
    margin: 0 auto;
    padding: .95rem 1.15rem 1rem;
    background: var(--flaeche);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
}

.wetter__kopf {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.wetter__bild { display: flex; color: var(--akzent); }

.wetter__grad {
    font-family: var(--schrift-anzeige);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--text);
}

.wetter__einheit {
    font-family: var(--schrift-anzeige);
    font-size: .8rem;
    color: var(--gedimmt);
    align-self: flex-start;
    margin-left: -.45rem;
    margin-top: .15rem;
}

.wetter__mitte {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.wetter__lage {
    font-size: .9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wetter__ort {
    font-family: var(--schrift-anzeige);
    font-size: .64rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gedimmt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wetter__rand {
    margin-left: auto;
    padding-left: .9rem;
    border-left: 1px solid var(--linie);
    font-size: .73rem;
    line-height: 1.5;
    color: var(--gedimmt);
    white-space: nowrap;
    text-align: right;
}

/* --- Ortseingabe --- */

.wetter__suche {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px solid var(--linie);
}

.wetter__label {
    flex: 1 0 100%;
    font-family: var(--schrift-anzeige);
    font-size: .62rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gedimmt);
    margin-bottom: .1rem;
}

.wetter__suche input {
    flex: 1;
    min-width: 0;
    padding: .5rem .7rem;
    background: var(--grund);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--schrift-text);
    font-size: .9rem;
}

.wetter__suche input:focus {
    outline: none;
    border-color: var(--akzent);
}

.wetter__suche button {
    padding: .5rem .85rem;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    font-family: var(--schrift-anzeige);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
}

.wetter__suche button:hover {
    border-color: var(--akzent);
    color: var(--akzent);
}

.wetter__zurueck {
    flex: 0 0 auto;
    font-size: 1rem !important;
    line-height: 1;
    padding: .5rem .65rem !important;
}

.wetter__fehler {
    margin-top: .7rem;
    font-size: .82rem;
    color: var(--warnung);
}

.wetter__stand {
    margin-top: .6rem;
    font-size: .68rem;
    color: var(--gedimmt);
    text-align: right;
}

@media (max-width: 480px) {
    .wetter__grad { font-size: 1.5rem; }
    .wetter__rand { display: none; }
}
