/* MyTime – Kundenportal und oeffentliches Formular.
   Ein eigenes Stilblatt: Die Seiten des Kunden laden nichts von der
   Anwendung, damit auch nichts von ihr auszulesen ist. */

:root {
    --marke: #2f6fd0;
    --bg: #f5f6f8;
    --flaeche: #ffffff;
    --flaeche-2: #fafbfc;
    --rand: #e2e5ea;
    --rand-stark: #cbd1da;
    --text: #1c2430;
    --leise: #6b7684;
    --gefahr: #c0392b;
    --gefahr-weich: #fdecea;
    --radius: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #14181f;
        --flaeche: #1b212b;
        --flaeche-2: #202733;
        --rand: #2c3542;
        --rand-stark: #3a4553;
        --text: #e6eaf0;
        --leise: #98a3b3;
        --gefahr: #e5776b;
        --gefahr-weich: #34211f;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-text-size-adjust: 100%;
}

/* Eingebettet steht das Formular in einer fremden Seite: kein eigener
   Hintergrund, kein Rand, keine doppelte Karte um die fremde herum. */
body.eingebettet { background: transparent; }

.huelle {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

body.eingebettet .huelle { padding: 8px 0 16px; }

/* ---------- Kopf und Fuss ---------- */

.kopf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--rand);
}

.kopf .logo { height: 32px; width: auto; }
.kopf .haus { font-weight: 600; font-size: 18px; }
.kopf form { margin-left: auto; }

.fuss {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--rand);
    color: var(--leise);
    font-size: 13px;
}

.fuss a { color: var(--leise); }

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

h1 { font-size: 22px; margin: 0 0 8px; line-height: 1.3; }

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

.karte {
    background: var(--flaeche);
    border: 1px solid var(--rand);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.karte.leer { text-align: center; color: var(--leise); }
.karte p:first-child { margin-top: 0; }
.karte p:last-child { margin-bottom: 0; }

.kopfzeile {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.kopfzeile h1 { margin-bottom: 2px; }
.kopfzeile p { margin: 0; }

.leise { color: var(--leise); }
.klein { font-size: 13px; }

.text { white-space: pre-wrap; margin-top: 6px; }

.fehler {
    background: var(--gefahr-weich);
    border: 1px solid var(--gefahr);
    color: var(--gefahr);
    border-radius: 8px;
    padding: 8px 12px;
}

/* ---------- Die Liste der Anfragen ---------- */

.liste { padding: 0; overflow: hidden; }

.zeile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rand);
    color: inherit;
    text-decoration: none;
}

.zeile:last-child { border-bottom: none; }
.zeile:hover { background: var(--flaeche-2); }
.zeile-kopf { flex: 1 1 260px; min-width: 0; }
.zeile .kennung { color: var(--leise); font-variant-numeric: tabular-nums; }
.zeile .betreff { font-weight: 600; }

/* ---------- Zustand ---------- */

.marke {
    display: inline-block;
    padding: 1px 10px;
    border-radius: 999px;
    border: 1px solid var(--rand-stark);
    background: var(--flaeche-2);
    font-size: 13px;
    white-space: nowrap;
}

.marke-neu, .marke-offen { border-color: var(--marke); color: var(--marke); }
.marke-erledigt, .marke-geschlossen { color: var(--leise); }

/* ---------- Nachrichten ---------- */

.nachricht { border-left: 3px solid var(--rand-stark); }
.nachricht.von-uns { border-left-color: var(--marke); }

.anhaenge { list-style: none; margin: 10px 0 0; padding: 0; }
.anhaenge li { padding: 3px 0; }
.anhaenge li::before { content: "⧉ "; color: var(--leise); }

/* ---------- Formulare ---------- */

.feldblock { display: block; }

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--leise);
    margin: 14px 0 4px;
}

input[type=text], input[type=email], textarea, input[type=file] {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: inherit;
    background: var(--flaeche-2);
    border: 1px solid var(--rand-stark);
    border-radius: 8px;
}

input[type=file] { padding: 8px; }
textarea { resize: vertical; min-height: 120px; }

input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--marke);
    outline-offset: 2px;
}

.knopf, .knopf-leise {
    display: inline-block;
    margin-top: 16px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid var(--marke);
    background: var(--marke);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    /* Mit dem Finger bedienbar: 44 Punkte sind das Mass, unter dem
       daneben getippt wird. */
    min-height: 44px;
}

.knopf-leise {
    background: transparent;
    color: var(--text);
    border-color: var(--rand-stark);
}

.knopf:hover { filter: brightness(1.08); }
.knopf-leise:hover { background: var(--flaeche-2); }

.kopfzeile .knopf, .kopfzeile .knopf-leise, .kopf .knopf-leise { margin-top: 0; }

/*
 * Der Honigtopf.
 *
 * Nicht `display:none`: Manche Programme fuellen nur aus, was im Dokument
 * steht und nicht offensichtlich versteckt ist. Aus dem Blickfeld geschoben
 * faellt es Menschen nicht auf, und `aria-hidden` haelt es aus den
 * Vorleseprogrammen heraus.
 */
.honig {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
