/* Gutschein-Kaufseite: eigene Seite der Praxis-App, im Look der App. Hauptfarbe aus den Einstellungen (farbe_style überschreibt :root). */
:root {
  --accent: #007A87; --accent-hover: #006974; --accent-ink: #fff; --accent-tint: rgba(0,122,135,.14); --accent-text: #007582;
  --bg: #F5F5F7; --card: #fff; --ink: #1D1D1F; --muted: #86868B; --line: #E8E8ED; --rot: #B3261E;
  --radius: 18px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
.kopf, main, .fuss { max-width: 1040px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 900px) { .kopf, main, .fuss { padding-left: 40px; padding-right: 40px; } }

/* Kopf: Logo der Praxis links, «Zur Webseite» rechts */
.kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 8px; }
.logo { display: block; line-height: 0; text-decoration: none; color: inherit; }
.logo img { display: block; max-height: 56px; max-width: 220px; width: auto; height: auto; }
.logo-name { font-size: 20px; font-weight: 600; line-height: 1.2; }
.zurueck { font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.zurueck::before { content: "← "; }

main { padding-top: 20px; padding-bottom: 48px; }
h1 { font-size: 32px; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 8px; }
@media (min-width: 900px) { h1 { font-size: 40px; } }
.lead { color: #515154; font-size: 17px; max-width: 620px; margin: 0 0 24px; }

/* Formular links, Vorschau rechts (Handy: Vorschau zuerst, darunter das Formular) */
.raster { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.raster .vorschau { order: -1; }
@media (min-width: 900px) { .raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: start; } .raster .vorschau { order: 0; position: sticky; top: 24px; } .raster.allein { grid-template-columns: minmax(0, 620px); } }
.kasten { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.kasten p:first-child { margin-top: 0; } .kasten p:last-child { margin-bottom: 0; }
.leise { color: var(--muted); font-weight: 400; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 5px; font-size: 14px; font-weight: 500; color: #515154; }
input, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid #D2D2D7; border-radius: 12px; padding: 11px 14px; width: 100%; }
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.fehlt input { border-color: var(--rot); }
hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.knopf { font: inherit; font-weight: 600; font-size: 16px; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.knopf:hover { background: var(--accent-hover); }
.knopf:disabled { opacity: .6; cursor: wait; }
.zahlarten { text-align: center; font-size: 13px; color: var(--muted); margin: 0; }
.fehler { color: var(--rot); margin: 0; }
.fehler:empty { display: none; }
.vorschau-hinweis { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-text); font-size: 14px; }
.nowrap { white-space: nowrap; }

/* Vorschau: der Gutschein im Querformat wie das PDF, links Text, rechts das Bild */
.gs-karte { display: grid; grid-template-columns: 63fr 37fr; aspect-ratio: 595 / 420; background: #FAF8F5; border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; container-type: inline-size; }
.gs-text { display: flex; flex-direction: column; gap: 1.6cqw; padding: 5cqw 4cqw 4cqw 6cqw; min-width: 0; color: var(--accent-text); }
.gs-logo { max-width: 26cqw; max-height: 11cqw; object-fit: contain; object-position: left; margin-bottom: 4cqw; }
.gs-logo-name { font-size: 4cqw; font-weight: 600; color: var(--ink); margin-bottom: 4cqw; }
.gs-text .titel { font-size: 1.9cqw; letter-spacing: .25em; }
.gs-text .fuer { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 4cqw; }
.gs-text .gruss { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 2.4cqw; color: #6B635D; overflow-wrap: anywhere; }
.gs-text .betrag { font-size: 6.5cqw; font-weight: 600; margin-top: auto; }
.gs-text span:empty { display: none; }
.gs-bild { position: relative; min-width: 0; }
.gs-bild img, .gs-bild svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Fuss: Praxisdaten */
.fuss { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; text-align: center; font-size: 13px; color: var(--muted); padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }
/* Eingebettet in die Webseite der Praxis: ohne Kopf, Fuss und Titel, durchsichtiger Hintergrund */
body.einbetten { background: transparent; }
body.einbetten .kopf, body.einbetten .fuss, body.einbetten main > h1, body.einbetten main > .lead { display: none; }
body.einbetten main { padding-top: 4px; padding-bottom: 8px; }
