/* Oeffentliche Gaeste-Buchungsseite (/reservieren) - selbe Marken-Palette wie
   styles.css (Landingpage), aber eigenstaendige, einfachere Regeln statt der
   kompletten Mockup-Kopie, da diese Seite strukturell voellig anders ist (Formular +
   interaktiver Tischplan statt Marketing-Scrollseite). */
:root {
    --ink: #332217;
    --dark: #26180f;
    --brown: #613817;
    --cream: #f9f3e8;
    --tan: #c29a70;
    --muted: #806952;
    --red: #b34e32;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.55;
}
a { color: inherit; }
.wrap { width: min(1100px, calc(100% - 48px)); margin: auto; }
/* Die Buchungsseite selbst (Tischplan + Formular) braucht deutlich mehr Breite als
   die Marketing-Startseite, fuer die .wrap eigentlich gedacht ist - eigener, breiterer
   Container statt die 1100px-Grenze global zu lockern. */
main.page .wrap { width: min(1600px, calc(100% - 48px)); }
.topbar {
    height: 80px;
    background: #fcf8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon { width: 32px; height: 32px; }
.brand strong { display: block; font-family: Georgia, 'Times New Roman', serif; font-size: 21px; line-height: 1.1; }
.brand small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.topbar a.back { font-size: 13px; font-weight: 700; color: var(--red); text-decoration: none; }

main.page { padding: 40px 0 70px; }
h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(32px, 4vw, 46px);
    margin: 0 0 10px;
}
.page-intro { color: var(--muted); max-width: 640px; margin-bottom: 28px; }

.lock-banner {
    background: #fbe0dd;
    border: 2px solid var(--red);
    color: var(--red);
    padding: 0.8rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 700;
}
.lock-banner[hidden] { display: none; }

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
/* Die eigene "display: grid"-Regel oben gewinnt sonst gegen die UA-Standardregel
   [hidden]{display:none} (Autoren-CSS hat immer Vorrang) - ohne das bleibt das
   Formular trotz hidden-Attribut sichtbar, siehe gleiches bekanntes Muster beim
   .pending-alert im Kernsystem. */
.booking-layout[hidden] { display: none; }
@media (max-width: 860px) {
    .booking-layout { grid-template-columns: 1fr; }
}

.floorplan-card {
    background: #fffdf8;
    border: 1px solid #e9dbca;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(76, 43, 20, 0.08);
    padding: 14px;
}
.floorplan-hint-row {
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.zoom-controls { display: flex; gap: 6px; }
.zoom-controls button {
    width: 34px; height: 34px;
    border-radius: 6px;
    border: 2px solid var(--brown);
    background: #fff;
    color: var(--brown);
    font-size: 1.1rem;
    cursor: pointer;
}

.floorplan-viewport {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: #fdf9f2;
    border-radius: 8px;
    border: 1px solid #ecdfce;
    touch-action: none;
    cursor: grab;
}
.floorplan-viewport.panning { cursor: grabbing; }
.floorplan-canvas { position: absolute; top: 0; left: 0; transform-origin: 0 0; }

.table-tile {
    position: absolute;
    /* Ohne explizites z-index liegen Tische hinter den Raum-Rechtecken (z-index:1) -
       ein positiv gesetztes z-index gewinnt in der Stacking-Reihenfolge immer gegen
       ein positioniertes Geschwisterelement ohne z-index, unabhaengig von der
       DOM-Reihenfolge. Gleiche Ebenen-Logik wie im Kernsystem-app.css: Rechtecke (1)
       unten, Tische (5) mittig, Text (10) oben. */
    z-index: 5;
    height: 64px;
    border-radius: 8px;
    border: 2px solid var(--tan);
    background: #f1dcc2;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    user-select: none;
    touch-action: none;
    cursor: pointer;
}
.table-tile .seats { font-weight: 400; font-size: 0.78rem; }

.seat-row {
    position: absolute;
    left: 4px;
    right: 4px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}
.seat-row.top { top: -10px; }
.seat-row.bottom { bottom: -10px; }
.seat-dot {
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 2px solid var(--brown);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 700; color: var(--brown); user-select: none;
}
.seat-dot.free { background: #eafaf1; border-color: #27ae60; color: #1e8449; cursor: pointer; }
.seat-dot.occupied { background: #fdecea; border-color: var(--red); color: var(--red); cursor: not-allowed; }
.seat-dot.selected { background: #2980b9; border-color: #1c5a80; color: #fff; }

.shape-rect {
    position: absolute;
    z-index: 1;
    box-sizing: border-box;
    border: 2px solid rgba(97, 56, 23, 0.25);
    border-radius: 4px;
}
.text-element {
    position: absolute;
    z-index: 10;
    padding: 2px 6px;
    font-weight: 700;
    font-size: 1.02rem;
    white-space: nowrap;
    user-select: none;
}

.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 2px solid; }
.legend .free-dot { background: #eafaf1; border-color: #27ae60; }
.legend .occ-dot { background: #fdecea; border-color: var(--red); }
.legend .sel-dot { background: #2980b9; border-color: #1c5a80; }

.booking-form {
    background: #fffdf8;
    border: 1px solid #e9dbca;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(76, 43, 20, 0.08);
    padding: 20px;
}
.booking-form .section-title { font-weight: 700; margin: 0 0 10px; font-family: Georgia, serif; font-size: 1.1rem; }
.booking-form label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--brown); margin: 10px 0 4px; }
.booking-form input, .booking-form select {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.55rem;
    border: 2px solid #e0cdb2;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}
.datetime-row { display: flex; gap: 8px; }
.datetime-row > div { flex: 1; min-width: 0; }
.duration-info {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 6px 0 2px;
}
.selection-info {
    font-weight: 700;
    padding: 0.6rem;
    background: #f3e6d5;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.88rem;
}
.booking-form button.submit {
    width: 100%;
    margin-top: 14px;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}
.booking-form button.submit:disabled { opacity: 0.45; cursor: not-allowed; }
.booking-form .form-hint { font-size: 0.78rem; color: var(--muted); margin: 6px 0; line-height: 1.4; }

.success-card {
    background: #eafaf1;
    border: 2px solid #27ae60;
    color: #1e8449;
    border-radius: 10px;
    padding: 22px;
    text-align: center;
}
.success-card h2 { margin-top: 0; font-family: Georgia, serif; }
.success-card[hidden] { display: none; }

.app-modal {
    width: min(420px, 90vw);
    border: none;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.app-modal::backdrop { background: rgba(0, 0, 0, 0.5); }
.app-modal-message { margin-bottom: 1rem; font-size: 1.02rem; line-height: 1.4; }
.app-modal-buttons { display: flex; justify-content: flex-end; gap: 0.6rem; }
.app-modal-buttons button {
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--brown);
    background: #fff;
    color: var(--brown);
    cursor: pointer;
}
.app-modal-buttons button.primary { background: var(--red); color: #fff; border-color: var(--red); }

footer { background: #20150f; color: #dcc4ad; padding: 22px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.footer-inner a { margin-left: 12px; color: #dcc4ad; }
