/* ============================================================
   LORBASS Reservierung – öffentliches Frontend (Mobile First)
   ------------------------------------------------------------
   An das Hauptdesign (main.css) angelehnt: dunkles Theme,
   Gold-Akzent, Website-Schriften (DM Sans / DM Serif Display /
   DirtyHeadline), Karten + Buttons im Lorbass-Stil. Mobile hat
   Priorität: große Touch-Flächen, gut lesbare Schrift, kein Zoom.
   Klassen/IDs unverändert -> wm.js bleibt kompatibel.
   ============================================================ */

@font-face {
  font-family: 'DirtyHeadline';
  src: url('../../../assets/fonts/Dirty_Headline.ttf') format('truetype');
  font-weight: normal; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../../../assets/fonts/dm-sans-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('../../../assets/fonts/dm-sans-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('../../../assets/fonts/dm-serif-display-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg:          #0d0d0d;
  --surface:     #161616;
  --surface2:    #1e1e1e;
  --border:      #2a2a2a;
  --accent:      #c8a96e;
  --accent-dim:  #7a6440;
  --accent-hover:#e0c080;
  --text:        #e8e4dc;
  --muted:       #6b6b6b;
  --logo-red:    #cc0000;
  --ok:          #5aa46a;
  --warn:        #d8b15a;
  --bad:         #c0453b;
  --radius:      12px;
  --radius-sm:   8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'DM Serif Display', serif; font-weight: 400; line-height: 1.25; }

/* ── Kopf ── */
.wm-header {
  background: rgba(13,13,13,0.98);
  border-bottom: 1px solid var(--border);
  padding: 18px 16px;
  text-align: center;
}
.wm-header .brand {
  display: inline-block;
  font-family: 'DirtyHeadline', sans-serif;
  font-size: 26px; color: var(--logo-red); letter-spacing: 0.05em;
  text-decoration: none;
}
.wm-header .sub {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-top: 3px;
}

.wm-wrap { max-width: 560px; margin: 0 auto; padding: 16px; }

/* ── Karten ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
}
.card h1 { font-size: 24px; margin: 0 0 4px; color: var(--text); }
.card h2 { font-size: 20px; margin: 0 0 10px; color: var(--accent); }
.event-meta {
  color: var(--accent-dim); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; margin: 0 0 8px;
}

/* ── Event-Liste (index) ── */
.event-link { display: block; text-decoration: none; color: var(--text); transition: border-color .2s ease; }
.event-link:hover { border-color: var(--accent-dim); }
.event-link .go { color: var(--accent); font-weight: 500; margin-top: 10px; }
.seats-status { font-weight: 600; font-size: 15px; margin-top: 12px; }

/* Infobox (Personen-Schritt): Absätze brauchen Abstand (globaler margin:0). */
.infobox p { margin-bottom: 12px; }
.infobox p:last-child { margin-bottom: 0; }
.event-soon { opacity: .55; }
/* Emoji aufrecht lassen – nur der Text (per <em>) kursiv. */
.soon-hint { color: var(--accent); font-size: 14px; margin: 0 0 8px; font-style: normal; }
.soon-hint em { font-style: italic; }

/* Intro-Block ohne Karte (zentriert) */
.wm-intro { text-align: center; margin: 10px 0 6px; }
.wm-intro h1 { font-size: 24px; margin: 0 0 4px; }
.wm-intro p { color: var(--text); margin: 0; }

/* ── Schritte ── */
.step { display: none; }
.step.active { display: block; }
.step-title { font-size: 15px; color: var(--muted); margin: 0 0 14px; letter-spacing: 0.04em; }

/* ── Personen-Stepper ── */
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0; }
.stepper button {
  width: 64px; height: 64px; border: none; border-radius: 50%;
  background: var(--accent); color: #0d0d0d; font-size: 32px; line-height: 1; cursor: pointer;
}
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper .count { font-size: 42px; font-weight: 800; min-width: 72px; text-align: center; color: var(--text); }

/* ── Buttons (groß, touch-freundlich) ── */
.btn {
  display: block; width: 100%; padding: 16px; border: 1px solid var(--accent);
  border-radius: 10px; background: var(--accent); color: #0d0d0d;
  font-size: 17px; font-weight: 600; letter-spacing: 0.04em;
  cursor: pointer; text-align: center; text-decoration: none; margin-top: 10px;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent-dim); }
.btn.secondary:hover { background: var(--accent); color: #0d0d0d; }
.btn.ghost   { background: transparent; color: var(--muted); border-color: transparent; font-weight: 500; }
.btn.danger  { background: #cc0000; color: #fff; border-color: #cc0000; }
.btn.danger:hover { background: #aa0000; border-color: #aa0000; }

/* ── Legende ── */
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 6px 0 14px; font-size: 14px; }
.legend .item { display: flex; align-items: center; gap: 7px; color: var(--text); }
.legend .dot { width: 18px; height: 18px; border-radius: 5px; display: inline-block; }
.legend .dot.green  { background: var(--ok); }
.legend .dot.yellow { background: var(--warn); }
.legend .dot.red    { background: var(--bad); }

/* ── Lageplan (PNG-Hintergrund + transparente Touch-Overlays) ── */
/* Die PNG ist reine Darstellung und wird NICHT eingefärbt. Die Tisch-
   Overlays liegen prozentual darüber und skalieren proportional mit. */
.plan { position: relative; width: 100%; max-width: 460px; margin: 0 auto; line-height: 0; }
.plan-img { width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }

.wm-table {
  position: absolute;
  margin: 0; padding: 0;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: border-color .12s ease, background-color .12s ease;
}
/* Statusfarben wirken ausschließlich auf die Overlay-Rahmen. */
.wm-table.frei      { border-color: var(--ok); }
.wm-table.teilweise { border-color: var(--warn); }
.wm-table.voll      { border-color: var(--bad); }
.wm-table.selectable { cursor: pointer; }
.wm-table.selectable:hover { background: rgba(255,255,255,0.12); }
/* Ausgewählter Tisch: deutlich breiterer BLAUER Rahmen (klar vom gelben
   "teilweise belegt" unterscheidbar). Andere Tische haben 2px Rahmen. */
.wm-table.selected { border-width: 6px; border-color: #2f80ed; background: rgba(47,128,237,0.22); }

.plan-hint { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ── Tisch-Detail (nach Antippen) ── */
.table-detail { border: 1px solid var(--border); background: var(--surface2); border-radius: 12px; padding: 14px; margin-top: 14px; }
.table-detail h3 { margin: 0 0 8px; font-size: 18px; color: var(--accent); }
.table-detail .nums { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.table-detail .nums b { color: var(--text); }

/* ── Hinweisbox (Fair-Play / Gültigkeit) ── */
.reminder {
  background: var(--surface2); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0; font-size: 15px; color: var(--text);
}
.reminder p { margin: 0 0 8px; }
.reminder p:last-child { margin-bottom: 0; }
.reminder strong { color: var(--accent); }

/* ── Formular ── */
.summary { background: var(--surface2); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: 15px; }
.summary b { display: inline-block; min-width: 90px; color: var(--accent-dim); }
.countdown { text-align: center; font-size: 15px; color: var(--muted); margin: 4px 0 14px; }
.countdown.warn { color: var(--bad); font-weight: 700; }

label.field { display: block; margin: 12px 0 4px; font-weight: 500; font-size: 15px; color: var(--text); }
input[type=text], input[type=email], textarea {
  width: 100%; padding: 14px; font-size: 17px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2); color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 80px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Hinweise / Status ── */
.note { padding: 12px 14px; border-radius: 10px; font-size: 15px; margin: 10px 0; }
.note.err { background: #2a0f0e; color: #f0b4ae; border: 1px solid #5a201c; }
.note.ok  { background: #122017; color: #9fd9b1; border: 1px solid #234a32; }
.note.info{ background: var(--surface2); color: var(--text); border: 1px solid var(--border); }

.done-icon { font-size: 48px; text-align: center; margin: 6px 0; color: var(--ok); }

.wm-footer { text-align: center; color: var(--muted); font-size: 12px; padding: 22px; letter-spacing: 0.1em; text-transform: uppercase; border-top: 1px solid var(--border); }
.wm-footer a { color: var(--accent); text-decoration: none; }

/* ── Desktop baut darauf auf ── */
@media (min-width: 700px) {
  .wm-wrap { padding: 24px; }
}
