/* ============================================================
   Reservierung – öffentliche Buchungsseite (kundenfreundlich)
   Mobile-first, modern, verfügbarkeitsgetrieben.
   ============================================================ */
:root {
    --r-card: #ffffff;
    --r-ink: #1e293b;
    --r-muted: #64748b;
    --r-line: #e2e8f0;
    --r-primary: #4f46e5;
    --r-primary-dark: #4338ca;
    --r-accent: #10b981;
    --r-accent-soft: #d1fae5;
    --r-danger: #ef4444;
    --r-shadow: 0 20px 50px -12px rgba(2, 6, 23, .45);
    --r-radius: 20px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--r-ink);
    min-height: 100vh;
    background:
        radial-gradient(1200px 600px at 15% -10%, #1e3a8a 0%, transparent 55%),
        radial-gradient(1000px 700px at 110% 10%, #6d28d9 0%, transparent 50%),
        linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 48px;
}

/* ---------- Karte ---------- */
.res-shell { width: 100%; max-width: 560px; }

.res-header { text-align: center; color: #fff; margin-bottom: 22px; }
.res-header .res-emoji {
    font-size: 2.4rem; line-height: 1;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}
.res-header .res-logo {
    max-height: 76px; max-width: 220px;
    margin: 0 auto 6px; display: block;
    background: #fff; border-radius: 14px; padding: 8px 14px;
    box-shadow: 0 10px 26px rgba(0,0,0,.30);
    object-fit: contain;
}
.res-header h1 {
    font-size: 1.7rem; font-weight: 800;
    margin: 10px 0 2px; letter-spacing: -.02em;
}
.res-header p { margin: 0; color: #cbd5e1; font-size: .98rem; }

.res-card {
    background: var(--r-card);
    border-radius: var(--r-radius);
    box-shadow: var(--r-shadow);
    overflow: hidden;
}

/* ---------- Fortschritt ---------- */
.res-progress { display: flex; gap: 6px; padding: 16px 22px 0; }
.res-progress .seg {
    flex: 1; height: 5px; border-radius: 99px;
    background: var(--r-line); transition: background .3s;
}
.res-progress .seg.active { background: var(--r-primary); }
.res-progress .seg.done { background: var(--r-accent); }

.res-body { padding: 20px 22px 26px; }

.step { display: none; animation: fade .35s ease; }
.step.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.step-title { font-size: 1.2rem; font-weight: 750; margin: 4px 0 4px; letter-spacing: -.01em; }
.step-sub { color: var(--r-muted); font-size: .9rem; margin: 0 0 18px; }

/* ---------- Personen-Stepper ---------- */
.personen-row {
    display: flex; align-items: center; justify-content: center;
    gap: 22px; margin: 8px 0 26px;
}
.pers-btn {
    width: 56px; height: 56px; border-radius: 50%;
    border: 2px solid var(--r-line); background: #fff;
    font-size: 1.6rem; color: var(--r-primary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .12s, border-color .2s; user-select: none;
}
.pers-btn:hover { border-color: var(--r-primary); }
.pers-btn:active { transform: scale(.92); }
.pers-btn:disabled { opacity: .35; cursor: default; }
.pers-value { text-align: center; min-width: 88px; }
.pers-value .num { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.pers-value .lbl { font-size: .82rem; color: var(--r-muted); margin-top: 2px; }

/* ---------- Tages-Strip ---------- */
.tage-strip {
    display: grid; grid-auto-flow: column; grid-auto-columns: 84px;
    gap: 10px; overflow-x: auto; padding: 4px 2px 14px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.tag-card {
    scroll-snap-align: start;
    border: 2px solid var(--r-line); border-radius: 14px;
    padding: 12px 6px 10px; text-align: center; cursor: pointer; background: #fff;
    transition: border-color .15s, transform .12s, box-shadow .15s;
}
.tag-card:hover:not(.disabled) { border-color: var(--r-primary); transform: translateY(-2px); }
.tag-card.selected { border-color: var(--r-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.tag-card.disabled { opacity: .4; cursor: not-allowed; background: #f8fafc; }
.tag-card .wd { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--r-muted); font-weight: 700; }
.tag-card .dn { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.tag-card .mo { font-size: .74rem; color: var(--r-muted); }
.tag-card .frei {
    margin-top: 7px; font-size: .7rem; font-weight: 700;
    border-radius: 99px; padding: 2px 4px;
    background: var(--r-accent-soft); color: #047857;
}
.tag-card.disabled .frei { background: #fee2e2; color: #b91c1c; }
.tag-card .heute-dot { font-size: .64rem; color: var(--r-primary); font-weight: 700; }

/* ---------- Zeit-Slots ---------- */
.slot-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px; margin-top: 6px;
}
.slot-chip {
    border: 2px solid var(--r-line); border-radius: 12px;
    padding: 11px 6px 9px; text-align: center; cursor: pointer; background: #fff;
    transition: border-color .15s, transform .12s, box-shadow .15s;
}
.slot-chip:hover:not(.disabled) { border-color: var(--r-primary); transform: translateY(-2px); }
.slot-chip.selected { border-color: var(--r-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.slot-chip.disabled { opacity: .38; cursor: not-allowed; background: #f8fafc; }
.slot-chip .t { font-size: 1.08rem; font-weight: 750; }
.slot-chip .f { font-size: .68rem; font-weight: 700; color: #047857; margin-top: 2px; }
.slot-chip.disabled .f { color: #b91c1c; }

.freie-zeit {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--r-line);
    font-size: .9rem; color: var(--r-muted);
}
.freie-zeit input[type=time] {
    border: 2px solid var(--r-line); border-radius: 10px; padding: 8px 10px; font-size: 1rem; font-family: inherit;
}
.btn-mini {
    border: 0; background: var(--r-primary); color: #fff; border-radius: 10px;
    padding: 9px 14px; font-weight: 650; cursor: pointer;
}
.btn-mini:active { transform: scale(.97); }

.empty-hint { text-align: center; color: var(--r-muted); padding: 28px 10px; font-size: .95rem; }
.empty-hint i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .6; }

/* ---------- Formular ---------- */
.res-field { margin-bottom: 14px; }
.res-field label { display: block; font-size: .84rem; font-weight: 650; margin-bottom: 5px; }
.res-field input, .res-field textarea {
    width: 100%; border: 2px solid var(--r-line); border-radius: 12px;
    padding: 12px 14px; font-size: 1rem; font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.res-field input:focus, .res-field textarea:focus {
    outline: none; border-color: var(--r-primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,.13);
}

.zusammenfassung {
    background: #f8fafc; border: 1px solid var(--r-line); border-radius: 14px;
    padding: 14px 16px; margin-bottom: 18px; display: grid; gap: 8px;
}
.zusammenfassung .z-row { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.zusammenfassung .z-row i { color: var(--r-primary); width: 18px; text-align: center; }

/* ---------- Buttons ---------- */
.btn-res {
    width: 100%; border: 0; border-radius: 14px; padding: 15px;
    font-size: 1.05rem; font-weight: 700; cursor: pointer;
    transition: transform .12s, background .2s, opacity .2s;
}
.btn-res:active { transform: scale(.985); }
.btn-res.primary { background: var(--r-primary); color: #fff; }
.btn-res.primary:hover { background: var(--r-primary-dark); }
.btn-res.success { background: var(--r-accent); color: #fff; }
.btn-res.success:hover { filter: brightness(.96); }
.btn-res:disabled { opacity: .5; cursor: default; }
.btn-ghost {
    width: 100%; background: none; border: 0; color: var(--r-muted);
    padding: 12px; font-size: .95rem; cursor: pointer; margin-top: 8px;
}
.btn-ghost:hover { color: var(--r-ink); }

/* ---------- Erfolg ---------- */
.erfolg { text-align: center; padding: 26px 10px 10px; }
.erfolg .check {
    width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--r-accent-soft); color: var(--r-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; animation: pop .45s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.erfolg h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 6px; }
.erfolg p { color: var(--r-muted); margin: 0 0 4px; }
.erfolg .tisch-badge {
    display: inline-block; margin-top: 12px; background: #eef2ff;
    color: var(--r-primary-dark); border-radius: 99px; padding: 7px 16px;
    font-weight: 700; font-size: .95rem;
}

/* ---------- Fehler-Screen ---------- */
.error-screen {
    background: #fff; border-radius: var(--r-radius); box-shadow: var(--r-shadow);
    padding: 40px 28px; text-align: center; color: var(--r-danger);
    max-width: 460px; width: 100%; font-size: 1.05rem; margin-top: 40px;
}
.error-screen i { font-size: 2.4rem; display: block; margin-bottom: 12px; }

.res-loader { text-align: center; color: var(--r-muted); padding: 30px; }
.res-spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.res-foot { text-align: center; color: #94a3b8; font-size: .76rem; margin-top: 18px; }
