/* Autofolien24 - Gutscheinverkauf */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --dark:   #14181C;
    --accent: #C8102E;
    --light:  #F4F5F7;
    --ink:    #22262B;
    --muted:  #6B7280;
    --line:   #E3E5E8;
    --radius: 6px;
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: #fff;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------- Kopf & Fuss */
.site-head { background: var(--dark); color: #fff; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }
.site-head a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 19px; letter-spacing: 2px; text-transform: uppercase; }
.brand img { display: block; max-height: 42px; width: auto; }
.site-head .back { font-size: 14px; color: #9AA0A6; }
.site-head .back:hover { color: #fff; }
.accent-bar { height: 4px; background: var(--accent); }

.site-foot { margin-top: 56px; border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 13px; color: var(--muted); }
.site-foot a { color: var(--muted); }
.site-foot .links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot .links a, .site-foot .links span { display: inline-block; padding: 8px 0; }

/* ---------------------------------------------------------------- Inhalte */
main { padding-top: 40px; }
h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 34px 0 14px; }
.lead { color: var(--muted); margin: 0 0 30px; }
.usp { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 32px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.usp li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 7px; }

/* --------------------------------------------------------------- Formular */
fieldset { border: 0; margin: 0 0 26px; padding: 0; }
legend { font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 0; margin-bottom: 12px; }

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.hint { font-weight: 400; color: var(--muted); font-size: 13px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], textarea, select {
    width: 100%; padding: 12px 13px; font: inherit; font-size: 16px;   /* 16px verhindert das Hineinzoomen auf dem iPhone */
    border: 1px solid #C9CCD1; border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { resize: vertical; min-height: 92px; }
.field { margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row.row-plz { grid-template-columns: 130px 1fr; }
@media (max-width: 560px) { .row, .row.row-plz { grid-template-columns: 1fr; } }

/* Hinweisbalken im Pruef-Zugang (Ansicht ja, Kauf nein) */
.preview-bar {
    background: #FFF5D6; border: 1px solid #E8CE7A; border-radius: var(--radius);
    padding: 13px 16px; margin: 0 0 26px; font-size: 14px; line-height: 1.6;
}
.preview-bar a { margin-left: 6px; white-space: nowrap; }

/* Betragsauswahl */
.amounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.amounts input { position: absolute; opacity: 0; width: 0; height: 0; }
.amounts label {
    display: flex; align-items: center; justify-content: center; margin: 0; cursor: pointer;
    border: 1.5px solid #C9CCD1; border-radius: var(--radius); padding: 15px 8px;
    font-size: 17px; font-weight: 700; background: #fff; transition: border-color .12s, background .12s;
}
.amounts label:hover { border-color: var(--dark); }
.amounts input:checked + label { border-color: var(--accent); background: #fff; box-shadow: inset 0 0 0 1px var(--accent); }
.amounts input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.amounts label.custom-label { font-size: 14px; line-height: 1.25; text-align: center; }
.custom-amount { margin-top: 14px; }
.custom-amount.hidden { display: none; }
.amount-input { display: flex; align-items: center; gap: 10px; max-width: 260px; }
.amount-input span { font-weight: 700; color: var(--muted); }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 15px; margin-bottom: 14px; padding: 6px 0; }
.check input { margin-top: 1px; flex: 0 0 auto; width: 22px; height: 22px; accent-color: var(--accent); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Zusammenfassung + Button */
.summary {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    background: var(--light); border-radius: var(--radius); padding: 16px 18px; margin: 26px 0 16px;
}
.summary .label { font-size: 13px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.summary .value { font-size: 26px; font-weight: 700; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 15px 22px; font: inherit; font-size: 16px; font-weight: 700;
    color: #fff; background: var(--accent); border: 0; border-radius: var(--radius); cursor: pointer;
    text-decoration: none;
}
.btn:hover { filter: brightness(0.92); }
.btn:focus-visible { outline: 3px solid var(--dark); outline-offset: 2px; }
.btn.secondary { background: var(--dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid #C9CCD1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { width: auto; flex: 1 1 220px; }

.pay-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 12px; }

/* Meldungen */
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 22px; font-size: 15px; }
.notice.error { background: #FDEDEF; border-left: 4px solid var(--accent); }
.notice.info { background: var(--light); border-left: 4px solid var(--dark); }
.notice ul { margin: 8px 0 0; padding-left: 18px; }

/* Ergebnisseiten */
.result { text-align: center; padding: 20px 0 8px; }
.result .icon { width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; color: #fff; background: var(--dark); margin-bottom: 18px; }
.result .icon.ok { background: #157347; }
.result .icon.bad { background: var(--accent); }
.code-box { background: var(--light); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.code-box .label { font-size: 11px; letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase; }
.code-box .code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 24px; font-weight: 700; letter-spacing: 2px; margin-top: 6px; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 12px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
table.data tr:hover td { background: #FAFBFC; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.tag.active { background: #E7F4EC; color: #157347; }
.tag.redeemed { background: var(--light); color: var(--muted); }
.tag.void { background: #FDEDEF; color: var(--accent); }
