/* Expert-Wunschbox: Reiter am linken Rand, Wunschfenster, Werbefenster
   und der Hinweis auf dem Dashboard. Verhalten: /js/wunsch-reiter.js.
   Hauptbuch & Beleg: Papier, Tinte, Saldo-Rot als Handlungsfarbe,
   Ocker für Expert; Linien statt weicher Schatten. */

/* ── Schwebender Wunschknopf ───────────────────────────────────────
   Seit 19.10.2026 bewusst leise: Im Ruhezustand ein kleiner runder Knopf
   mit Stern in Papierfarbe, ohne Schatten. Beim Überfahren oder mit dem
   Tastaturfokus klappt „Was fehlt dir?" seitlich heraus. Beim Scrollen
   wird er blasser (Klasse ist-gedaempft, js/wunsch-reiter.js).
   Breite Bildschirme: links oben im freien Seitenrand; schmaler: links
   unten. Ausblendbar in der Wunschbox, dann bleibt das Profilmenü. */

.wunsch-reiter {
    position: fixed;
    left: 24px;
    top: 150px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0;
    height: 40px;
    min-width: 40px;
    padding: 0 9px;
    border: 1px solid #DAD3C2;
    border-radius: 20px;
    background: #FCFAF4;
    color: #3D3A33;
    cursor: pointer;
    overflow: hidden;
    opacity: 1;
    touch-action: manipulation;
    transition: opacity 0.25s ease, border-color 0.15s ease, gap 0.2s ease, padding 0.2s ease;
}
.wunsch-reiter[hidden] { display: none; }
.wunsch-reiter svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    fill: #D9A877;
    stroke: #8F5F3C;
    stroke-width: 1.2;
    stroke-linejoin: round;
}
.wunsch-reiter-titel {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    transition: max-width 0.25s ease;
}
.wunsch-reiter.ist-gedaempft { opacity: 0.45; }

/* Herausklappen nur bei echter Maus — auf Touch öffnet ein Tippen gleich
   die Wunschbox, ein halber Zwischenschritt wäre dort nur im Weg. */
@media (hover: hover) {
    .wunsch-reiter:hover { opacity: 1; gap: 8px; padding-right: 14px; border-color: #8F5F3C; }
    .wunsch-reiter:hover .wunsch-reiter-titel { max-width: 140px; }
}
.wunsch-reiter:focus-visible { opacity: 1; gap: 8px; padding-right: 14px; outline: 2px solid #B0492C; outline-offset: 2px; }
.wunsch-reiter:focus-visible .wunsch-reiter-titel { max-width: 140px; }

@media (max-width: 1399px) {
    .wunsch-reiter {
        top: auto;
        left: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .wunsch-reiter, .wunsch-reiter-titel { transition: none; }
}

/* Einmalige Vorstellung: Knopf aufgeklappt, Sprechblase daneben. */
.wunsch-reiter.ist-vorgestellt { gap: 8px; padding-right: 14px; border-color: #8F5F3C; }
.wunsch-reiter.ist-vorgestellt .wunsch-reiter-titel { max-width: 140px; }

.wunsch-blase {
    position: fixed;
    left: 24px;
    top: 200px;
    z-index: 9001;
    width: min(250px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid #1A1A17;
    border-top: 3px solid #D9A877;
    background: #FCFAF4;
    color: #1A1A17;
    box-shadow: 3px 3px 0 #1A1A17;
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    line-height: 1.5;
}
.wunsch-blase::before {
    content: "";
    position: absolute;
    left: 14px;
    top: -10px;
    border: 7px solid transparent;
    border-bottom-color: #1A1A17;
    border-top: 0;
}
.wunsch-blase p { margin: 0 0 10px; }
.wunsch-blase strong { font-weight: 600; }
.wunsch-blase-ok {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #1A1A17;
    background: #1A1A17;
    color: #FCFAF4;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.wunsch-blase-ok:focus-visible { outline: 2px solid #B0492C; outline-offset: 2px; }

@media (max-width: 1399px) {
    .wunsch-blase {
        top: auto;
        left: 16px;
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }
    .wunsch-blase::before {
        top: auto;
        bottom: -7px;
        border-top: 7px solid #1A1A17;
        border-bottom: 0;
    }
}

/* Schalter in der Wunschbox: Knopf aus- oder einblenden. */
.wunsch-knopfwahl { margin: 14px 0 0; }
.wunsch-knopfwahl-knopf {
    padding: 0;
    border: 0;
    background: none;
    color: #736B5B;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.wunsch-knopfwahl-knopf:hover { color: #1A1A17; }
.wunsch-knopfwahl-knopf:focus-visible { outline: 2px solid #B0492C; outline-offset: 2px; }

@media print { .wunsch-reiter { display: none; } }

/* ── Fenster (Wunschbox und Werbung) ─────────────────────────────── */

.wunsch-fenster {
    position: fixed;
    inset: 0;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    height: fit-content;
    margin: auto;
    padding: 0;
    border: 1px solid #1A1A17;
    border-top: 3px solid #B0492C;
    background: #FCFAF4;
    color: #1A1A17;
    box-shadow: 4px 4px 0 #1A1A17;
    overflow: auto;
}
.wunsch-fenster::backdrop { background: rgba(26, 26, 23, 0.45); }

.wunsch-form {
    position: relative;
    margin: 0;
    padding: 26px 26px 22px;
    font-family: 'Lora', 'Source Serif 4', Georgia, serif;
}

.wunsch-zu {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 1px solid #DAD3C2;
    background: #F4F1E8;
    color: #1A1A17;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.wunsch-zu:focus-visible { outline: 2px solid #B0492C; outline-offset: 2px; }

.wunsch-marke {
    margin: 0 0 8px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #8F5F3C;
}
.wunsch-fenster h2 {
    margin: 0 0 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1A1A17;
    font-size: 24px;
    font-weight: 500;
}
.wunsch-einleitung {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.6;
    color: #3D3A33;
}

.wunsch-arten {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
}
.wunsch-arten legend {
    margin-bottom: 8px;
    padding: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #5F5848;
}
.wunsch-art { position: relative; }
.wunsch-art input { position: absolute; opacity: 0; pointer-events: none; }
.wunsch-art span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #DAD3C2;
    background: #FFFFFF;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.6px;
    cursor: pointer;
}
.wunsch-art input:checked + span { border-color: #1A1A17; background: #1A1A17; color: #FCFAF4; }
.wunsch-art input:focus-visible + span { outline: 2px solid #B0492C; outline-offset: 2px; }

.wunsch-arthilfe {
    margin: 0 0 14px;
    font-size: 13px;
    color: #5F5848;
}

.wunsch-feld { display: grid; gap: 6px; }
.wunsch-feld > span {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #5F5848;
}
.wunsch-feld textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #1A1A17;
    background: #FFFFFF;
    color: #1A1A17;
    font: 16px/1.5 'Lora', Georgia, serif;
    resize: vertical;
}
.wunsch-feld textarea:focus-visible { outline: 2px solid #B0492C; outline-offset: 1px; }

.wunsch-ort {
    margin: 6px 0 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: #736B5B;
}

.wunsch-meldung { min-height: 1.4em; margin: 10px 0; font-size: 14px; }
.wunsch-meldung.ist-gut { color: var(--feedback-correct-accent, #28714c); }
.wunsch-meldung.ist-fehler { color: var(--feedback-wrong-accent, #b64b2d); }

.wunsch-senden {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid #1A1A17;
    background: #B0492C;
    color: #FCFAF4;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}
.wunsch-senden:hover { background: #93381C; }
.wunsch-senden:disabled { background: #736B5B; cursor: wait; }
.wunsch-senden:focus-visible { outline: 2px solid #1A1A17; outline-offset: 2px; }

.wunsch-liste {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #1A1A17;
}
.wunsch-liste h3 {
    margin: 0 0 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #5F5848;
}
.wunsch-liste ul { margin: 0; padding: 0; list-style: none; }
.wunsch-eintrag { padding: 12px 0; border-bottom: 1px solid #DAD3C2; }
.wunsch-eintrag p { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: #3D3A33; overflow-wrap: anywhere; }
.wunsch-eintrag-kopf {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    color: #736B5B;
}
.wunsch-eintrag-art { color: #1A1A17; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.wunsch-status { padding: 2px 7px; border: 1px solid currentColor; letter-spacing: 0.6px; }
.wunsch-status.ist-neu { color: #5F5848; }
.wunsch-status.ist-geplant { color: #8F5F3C; }
.wunsch-status.ist-umgesetzt { color: #1F7A4D; }
.wunsch-status.ist-abgelehnt { color: #736B5B; }
.wunsch-antwort { padding-left: 10px; border-left: 2px solid #D9A877; }
.wunsch-leer { margin: 0; font-size: 14px; color: #736B5B; }

.wunsch-vorteile { margin: 0 0 16px; padding-left: 20px; font-size: 15px; line-height: 1.55; color: #3D3A33; }
.wunsch-vorteile li { margin-bottom: 8px; }
.wunsch-vorteile strong { color: #1A1A17; font-weight: 600; }

@media (max-width: 720px) {
    .wunsch-form { padding: 22px 16px 18px; }
    .wunsch-fenster h2 { font-size: 21px; padding-right: 40px; }
    .wunsch-senden { width: 100%; }
}

/* ── Admin: Expert-Wünsche (admin.html, js/admin-wuensche.js) ────── */

.admin-wunsch-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.admin-wunsch-filterknopf {
    padding: 6px 12px;
    border: 1px solid #DAD3C2;
    background: #FFFFFF;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    cursor: pointer;
}
.admin-wunsch-filterknopf span { color: #736B5B; }
.admin-wunsch-filterknopf.ist-aktiv { border-color: #1A1A17; background: #1A1A17; color: #FCFAF4; }
.admin-wunsch-filterknopf.ist-aktiv span { color: #D9A877; }

.admin-wunsch-liste { display: grid; gap: 12px; }
.admin-wunsch { padding: 14px 16px; border: 1px solid #DAD3C2; border-left: 3px solid #D9A877; background: #FFFFFF; }
.admin-wunsch-kopf { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; font-size: 13px; color: #5F5848; }
.admin-wunsch-kopf strong { color: #1A1A17; }
.admin-wunsch-kopf a { color: #B0492C; overflow-wrap: anywhere; }
.admin-wunsch-art {
    padding: 1px 6px;
    border: 1px solid #8F5F3C;
    color: #8F5F3C;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.admin-wunsch-text { margin: 10px 0 12px; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-wunsch-bearbeiten { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; font-size: 13px; color: #5F5848; }
.admin-wunsch-bearbeiten label { display: grid; gap: 4px; }
.admin-wunsch-bearbeiten select,
.admin-wunsch-bearbeiten textarea { padding: 6px 8px; border: 1px solid #DAD3C2; font: inherit; font-size: 14px; color: #1A1A17; background: #FFFFFF; }
.admin-wunsch-antwortfeld { flex: 1 1 280px; }
.admin-wunsch-antwortfeld textarea { width: 100%; resize: vertical; }
.admin-wunsch-rueckmeldung { font-size: 13px; color: #1F7A4D; }
