/* ═══════════════════════════════════════════════════════════
   Camping Sonnental – Hauptstylesheet  (Mobile-First)
   ═══════════════════════════════════════════════════════════ */

/* ── Custom Properties ─────────────────────────────────── */
:root {
  --c-primary:       #2e7d32;
  --c-primary-light: #43a047;
  --c-primary-dark:  #1b5e20;
  --c-primary-bg:    #e8f5e9;
  --c-accent:        #f9a825;
  --c-danger:        #e53935;
  --c-info:          #1565c0;
  --c-bg:            #f0f5ee;
  --c-card:          #ffffff;
  --c-text:          #1e2f1e;
  --c-text-muted:    #627462;
  --c-border:        #d4e4d4;

  --c-spot-default:   #6b7280;
  --c-spot-available: #16a34a;
  --c-spot-occupied:  #dc2626;
  --c-spot-selected:  #2563eb;

  --radius-sm:  8px;
  --radius:     14px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.08);
  --shadow:     0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.14);
  --sidebar-w:  340px;
  --header-h:   88px;
  --transition: 0.25s ease;

  /* Touch targets */
  --touch-min: 44px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Verhindert Seiten-Überschieben auf iOS */
  overflow-x: hidden;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: #ffffff;
  box-shadow: 0 1px 0 #d4e4d4, 0 2px 8px rgba(0,0,0,0.07);
}

.header-inner {
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
}

.logo-icon { font-size: 38px; line-height: 1; flex-shrink: 0; color: var(--c-primary); }
.logo-img  { height: 68px; width: auto; object-fit: contain; flex-shrink: 0; border-radius: 4px; }

.logo-text { display: flex; flex-direction: column; min-width: 0; }

.logo-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-sub {
  font-size: 0.68rem;
  color: var(--c-text-muted);
  letter-spacing: 0.4px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   LAYOUT  –  Mobile-First (1 Spalte), Desktop (2 Spalten)
   ══════════════════════════════════════════════════════════ */
.app-layout {
  flex: 1;
  display: flex;
  flex-direction: column;   /* Mobile: vertikal gestapelt */
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  order: 2;                  /* Mobile: Formular UNTER der Karte */
  width: 100%;
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: 16px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Map Wrapper ─────────────────────────────────────────── */
.map-wrapper {
  order: 1;                  /* Mobile: Karte OBEN */
  display: flex;
  flex-direction: column;
  background: #2a3a2a;
  height: 85vh;
  min-height: 380px;
  max-height: 93vh;
  overflow: hidden;
  /* Beim Scroll via scrollIntoView: Abstand für den sticky Header einhalten */
  scroll-margin-top: var(--header-h);
}

/* Mobile: Datumskarte mit gleichem horizontalen Einzug wie Sidebar-Cards.
   Desktop überschreibt diese Margin mit 0 im Grid-Block. */
#step-dates {
  margin: 0 16px;
}

/* ═══════════════════════════════════════════════════════════
   DESKTOP  ≥ 900px
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  /* Einspalte: Datum → Karte → Formular (Grid garantiert gleiche Breite) */
  .app-layout {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "dates"
      "map"
      "sidebar";
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 16px 60px;
    gap: 16px;
  }

  #step-dates {
    grid-area: dates;
    min-width: 0;
    margin: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--c-border);
    padding: 20px 24px;
  }

  .map-wrapper {
    grid-area: map;
    min-width: 0;
    height: 85vh;
    min-height: 560px;
    max-height: 920px;
    background: var(--c-card);
    border-radius: var(--radius);
    overflow: hidden;
  }

  .sidebar {
    grid-area: sidebar;
    min-width: 0;
    border-top: none;
    overflow-y: visible;
    padding: 0;
    background: transparent;
  }

  /* Karte ausgeblendet (wird per JS gesteuert) */
  .app-layout.map-hidden {
    grid-template-areas:
      "dates"
      "sidebar";
  }
  .app-layout.map-hidden .map-wrapper { display: none; }
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.card-spot {
  border-color: #bbdefb;
  background: #f0f8ff;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
}

.step-badge--blue { background: var(--c-info); }

/* ── Form Elements ───────────────────────────────────────── */
.form-label .required-star { color: #e03; font-style: normal; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-group { margin-bottom: 12px; }

.form-input {
  width: 100%;
  /* 16px verhindert Auto-Zoom auf iOS */
  padding: 11px 12px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--c-text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
  /* Verhindert gerundete Ecken auf iOS */
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: var(--c-primary-light);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.18);
}

.form-input::placeholder { color: #aaa; }

.req { color: var(--c-danger); }

.hint {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-top: 7px;
  line-height: 1.5;
}

/* Flatpickr input */
.datepicker-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  color: var(--c-text);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7c6b' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3C/svg%3E") no-repeat right 14px center;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  min-height: var(--touch-min);
}

.datepicker-input:focus {
  border-color: var(--c-primary-light);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.18);
}

/* ── Spot Selected Header ────────────────────────────────── */
.spot-selected-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #bbdefb;
}

.btn-change-spot {
  flex: 1;
  background: none;
  border: 1.5px solid #90caf9;
  border-radius: var(--radius-sm);
  color: var(--c-info);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-align: left;
  min-height: var(--touch-min);
}

.btn-change-spot:hover,
.btn-change-spot:active { background: #e3f2fd; border-color: var(--c-info); }

/* ── Spot Info Box ───────────────────────────────────────── */
.spot-info-box { display: flex; flex-direction: column; gap: 4px; }
.spot-info-name { font-size: 1.05rem; font-weight: 700; color: var(--c-info); }
.spot-info-desc { font-size: 0.85rem; color: var(--c-text-muted); line-height: 1.5; }
.spot-info-acc  { font-size: 0.82rem; color: var(--c-info); font-weight: 600; margin-top: 2px; }

/* ── Two-column form row ─────────────────────────────────── */
.form-row-2 {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
}

/* ── Book Button ─────────────────────────────────────────── */
.btn-book {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 4px;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background var(--transition), transform 0.1s, box-shadow var(--transition);
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
}

.btn-book:hover:not(:disabled),
.btn-book:active:not(:disabled) {
  background: var(--c-primary-light);
  box-shadow: 0 4px 14px rgba(46,125,50,0.35);
}

.btn-book:disabled { opacity: 0.6; cursor: not-allowed; }


/* ══════════════════════════════════════════════════════════
   MAP AREA
   ══════════════════════════════════════════════════════════ */
.map-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-border);
  min-height: 40px;
  flex-shrink: 0;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Acc-Change-Bar (Unterkunftsart-Badge in der Topbar) ──── */
#acc-change-bar {
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  background: var(--c-primary-bg);
  border: 1px solid #c8e6c9;
  border-radius: 20px;
  padding: 3px 6px 3px 10px;
  white-space: nowrap;
  margin-left: auto;
}
#acc-change-bar:not([hidden]) { display: flex; }
.acc-cb-label { color: var(--c-primary-dark); }
.acc-cb-btn {
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.acc-cb-btn:hover { background: var(--c-primary-light); }

/* ── Acc-Overlay (über der Karte) ────────────────────────── */
#acc-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(10, 20, 10, 0.55);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
#acc-overlay:not([hidden]) { display: flex; }
.acc-overlay-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  max-width: 460px;
  width: calc(100% - 32px);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
}
.acc-overlay-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-primary-dark);
  margin-bottom: 14px;
  text-align: center;
}
.acc-overlay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.acc-overlay-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.acc-overlay-btn:hover,
.acc-overlay-btn:focus { border-color: var(--c-primary); background: var(--c-primary-bg); outline: none; }
.acc-overlay-btn.active { border-color: var(--c-primary); background: var(--c-primary-bg); }
.acc-overlay-name   { font-weight: 600; font-size: .88rem; color: #1a2a1a; }
.acc-overlay-detail { font-size: .72rem; color: #5a8a5a; }
.acc-overlay-price  { font-size: .75rem; color: #777; }

/* ── Auswahlleiste unter der Karte ─────────────────────────── */
#selection-bar:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 14px;
  background: var(--c-primary-bg, #eaf3ea);
  border: 1px solid var(--c-primary-light, #b3d9b3);
  border-radius: 8px;
  font-size: .85rem;
  color: #2a4a2a;
}
#selection-bar #sel-spot   { font-weight: 700; }
#selection-bar .sel-sep    { color: #9ab09a; }
#selection-bar #sel-acc    { color: #4a7a4a; }
#selection-bar #sel-nights { color: #777; }

.map-instruction {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  font-style: italic;
  line-height: 1.3;
}

.map-loader {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--c-primary);
}

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(46, 125, 50, 0.25);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legend ──────────────────────────────────────────────── */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 6px 14px;
  background: #f7faf6;
  border-bottom: 1px solid var(--c-border);
  flex-shrink: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--c-text-muted);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dot-available { background: var(--c-spot-available); }
.dot-occupied  { background: var(--c-spot-occupied); }
.dot-selected  { background: var(--c-spot-selected); }

/* Hinweis unter der Karte (Stellplatz / organisatorisch) */
.map-spot-disclaimer {
  margin: 0;
  padding: 8px 14px 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--c-text-muted);
  background: #f7faf6;
  border-top: 1px solid var(--c-border);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   AERIAL MAP
   ══════════════════════════════════════════════════════════ */
.map-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  /* kein Padding – nutzt volle Fläche als Viewport */
}

.aerial-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: grab;
  background: #1a2a1a;
}
.aerial-map.is-panning { cursor: grabbing; }

/* Innerer Transform-Wrapper – absolut positioniert, natürliche Bildgröße per JS */
#map-inner {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* Pin-Overlay: nicht transformiert → Pins immer in nativer Auflösung scharf */
#pin-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Bild in natürlicher Größe rendern → kein Blur beim Zoom */
.aerial-bg {
  display: block;
  max-width: none;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Zoom-Steuerung */
.map-zoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 20;
}
.mzc-btn {
  width: 32px;
  height: 32px;
  background: rgba(20,30,50,.82);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 7px;
  color: #e0e8f4;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  backdrop-filter: blur(4px);
}
.mzc-btn:hover { background: rgba(45,140,240,.75); }

/* ══════════════════════════════════════════════════════════
   SPOT PIN MARKERS (buchbar) – Wohnwagen-Icon
   ══════════════════════════════════════════════════════════ */
.spot-pin {
  --pin-color: var(--c-spot-default);
  position: absolute;
  transform: translate(-50%, -100%);
  transform-origin: center bottom;
  z-index: 10;
  border: none;
  background: none;
  padding: 0;
  cursor: default;
  pointer-events: none;
  font-family: inherit;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Unsichtbarer Tipp-Bereich */
.spot-pin::before {
  content: '';
  position: absolute;
  inset: -10px -14px;
  z-index: -1;
}

/* Wohnwagen-SVG-Wrapper */
.pin-caravan {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-caravan-svg {
  width: var(--pin-size, 26px);
  height: auto;
  display: block;
  overflow: visible;
}
/* Kreis: gleiche Breite und Höhe, kein Stauchen */
.pin-caravan-svg[viewBox="0 0 60 60"] {
  width: var(--pin-size, 26px);
  height: var(--pin-size, 26px);
}

/* SVG-Körper: Farbe per CSS-Variable */
.pin-caravan-svg .caravan-body { fill: var(--pin-color); }

.pin-tail {
  display: block;
  width: 0;
  height: 0;
  margin: 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--pin-color);
}

/* ── Available ── */
.spot-pin.spot-available {
  --pin-color: var(--c-spot-available);
  cursor: pointer;
  pointer-events: auto;
}
.spot-pin.spot-available:hover,
.spot-pin.spot-available:focus {
  transform: translate(-50%, -100%) scale(1.2);
  z-index: 15;
  outline: none;
}
.spot-pin.spot-available:active {
  transform: translate(-50%, -100%) scale(1.05);
}

/* ── Occupied ── */
.spot-pin.spot-occupied {
  --pin-color: var(--c-spot-occupied);
  cursor: not-allowed;
  pointer-events: auto;
}

/* ── Selected ── */
.spot-pin.spot-selected {
  --pin-color: var(--c-spot-selected);
  pointer-events: auto;
  z-index: 15;
}
.spot-pin.spot-selected .pin-caravan {
  animation: pulse-pin 1.8s ease-in-out infinite;
}

@keyframes pulse-pin {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(37,99,235,0.45)); }
  50%      { filter: drop-shadow(0 4px 18px rgba(37,99,235,0.8)); }
}


/* ══════════════════════════════════════════════════════════
   MOBILER SCROLL-HINWEIS (erscheint nach Datumswahl)
   ══════════════════════════════════════════════════════════ */
.scroll-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--c-primary-bg);
  border-top: 1px solid #c8e6c9;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-primary-dark);
  flex-shrink: 0;
  animation: hint-pulse 2s ease-in-out 1;
}

.scroll-hint.visible { display: flex; }

@keyframes hint-pulse {
  0%,100% { background: var(--c-primary-bg); }
  50%      { background: #c8e6c9; }
}


/* Mobile: Datumskarte flach (kein Schatten/Radius), direkt über der Karte */
@media (max-width: 899px) {
  #step-dates {
    order: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid var(--c-border);
    width: 100%;
  }
}


/* ══════════════════════════════════════════════════════════
   SPOT BOTTOM SHEET  (schiebt sich von unten hoch – Mobile)
   ══════════════════════════════════════════════════════════ */
.sbs-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 800;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sbs-backdrop.visible { display: block; }

.spot-bottom-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 801;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 32px rgba(0, 0, 0, .22);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.32, 1, .52, 1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.spot-bottom-sheet.open { transform: translateY(0); }

.sbs-handle-bar {
  width: 44px; height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 12px auto 0;
}
.sbs-body {
  padding: 14px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sbs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sbs-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-primary-dark);
}
.sbs-close {
  width: 32px; height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: .9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #64748b;
  flex-shrink: 0;
}
.sbs-close:active { background: #e2e8f0; }
.sbs-dates {
  font-size: .95rem;
  color: var(--c-text);
}
.sbs-dates strong { color: var(--c-primary-dark); }
.sbs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: .87rem;
  color: #64748b;
}
.sbs-cta {
  background: var(--c-primary);
  color: #fff;
  border: none;
  padding: 15px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: .02em;
}
.sbs-cta:active { background: var(--c-primary-dark); }

@media (min-width: 900px) {
  .sbs-backdrop,
  .spot-bottom-sheet { display: none !important; }
}


/* ══════════════════════════════════════════════════════════
   TOOLTIP
   ══════════════════════════════════════════════════════════ */
.spot-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: rgba(20, 30, 20, 0.96);
  color: #e8f0e8;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  max-width: 240px;
  min-width: 150px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
}
.tt-name {
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.tt-meta {
  font-size: .76rem;
  color: #a8c8a8;
  margin-bottom: 4px;
}
.tt-desc {
  font-size: .78rem;
  color: #c8dcc8;
  margin-bottom: 5px;
  line-height: 1.4;
}

.tt-avail {
  font-size: .76rem;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.tt-avail--ok   { color: #7ec87e; }
.tt-avail--busy { color: #f07070; }

/* ══════════════════════════════════════════════════════════
   SUCCESS OVERLAY
   ══════════════════════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fade-in 0.25s ease;
  padding: 16px;
}

.overlay[hidden] { display: none; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.overlay-card {
  background: var(--c-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: slide-up 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.overlay-check {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--c-primary);
  font-weight: 900;
  margin: 0 auto 16px;
  border: 3px solid var(--c-primary-light);
}

.overlay-card h2 { font-size: 1.2rem; color: var(--c-primary-dark); margin-bottom: 16px; }

.overlay-details {
  text-align: left;
  background: var(--c-bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--c-border);
}

.overlay-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--c-border);
}

.overlay-row:last-child { border-bottom: none; }
.overlay-row span { color: var(--c-text-muted); }

.overlay-row--total span,
.overlay-row--total strong { font-size: 1rem; color: var(--c-primary-dark); }

.overlay-note {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* ══════════════════════════════════════════════════════════
   ERROR TOAST
   ══════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 400;
  background: #b71c1c;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  width: calc(100% - 32px);
  max-width: 400px;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ══════════════════════════════════════════════════════════
   FLATPICKR THEME OVERRIDES
   ══════════════════════════════════════════════════════════ */
.flatpickr-calendar {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--c-border) !important;
  width: 100% !important;
  max-width: 320px !important;
}

/* Auf sehr kleinen Screens: volle Breite */
@media (max-width: 360px) {
  .flatpickr-calendar { max-width: calc(100vw - 24px) !important; }
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--c-primary) !important;
  border-color: var(--c-primary) !important;
}

.flatpickr-day.inRange {
  background: var(--c-primary-bg) !important;
  box-shadow: -5px 0 0 var(--c-primary-bg), 5px 0 0 var(--c-primary-bg) !important;
  border-color: var(--c-primary-bg) !important;
  color: var(--c-primary-dark) !important;
}

.flatpickr-day:hover {
  background: var(--c-primary-bg) !important;
  border-color: var(--c-primary-light) !important;
}

.flatpickr-day { min-height: 38px !important; line-height: 38px !important; }

/* ══════════════════════════════════════════════════════════
   FORM SECTIONS
   ══════════════════════════════════════════════════════════ */
.form-section {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--c-border);
}

.form-section:last-of-type { border-bottom: none; }

.form-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ── Unterkunftsart Radio-Grid ─────────────────────────── */
.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.acc-option { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.acc-option input[type="radio"] { display: none; }

.acc-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 6px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: border-color var(--transition), background var(--transition);
  gap: 2px;
  min-height: 60px;
  justify-content: center;
}

.acc-option input:checked + .acc-inner {
  border-color: var(--c-primary);
  background: var(--c-primary-bg);
}

.acc-option:active .acc-inner { background: #f0fdf4; }

.acc-name { font-size: 0.82rem; font-weight: 700; color: var(--c-text); line-height: 1.2; }
.acc-detail { font-size: 0.7rem; color: var(--c-text-muted); line-height: 1.2; }
.acc-price { font-size: 0.78rem; font-weight: 700; color: var(--c-primary-dark); margin-top: 2px; }

/* ── Counter ───────────────────────────────────────────── */
.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed #e5e7eb;
  gap: 8px;
}

.counter-row:last-child { border-bottom: none; }
.counter-info { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.counter-label { font-size: 0.9rem; font-weight: 600; color: var(--c-text); }
.counter-sub { font-size: 0.73rem; color: var(--c-text-muted); }

.counter-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Große Touch-Buttons für Counter */
.cnt-btn {
  width: var(--touch-min);
  height: var(--touch-min);
  border: 1.5px solid var(--c-border);
  border-radius: 50%;
  background: #fff;
  color: var(--c-primary-dark);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.cnt-btn:hover,
.cnt-btn:active {
  background: var(--c-primary-bg);
  border-color: var(--c-primary-light);
}

.cnt-input {
  width: 40px;
  text-align: center;
  border: 1.5px solid var(--c-border);
  border-radius: 6px;
  padding: 6px 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  background: #fff;
  -moz-appearance: textfield;
  -webkit-appearance: none;
}

/* Spinner bei allen Zahlenfeldern ausblenden */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cnt-input::-webkit-inner-spin-button,
.cnt-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Checkboxes ────────────────────────────────────────── */
.check-row {
  padding: 9px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.check-row:last-child { border-bottom: none; }

.check-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: var(--touch-min);
  -webkit-tap-highlight-color: transparent;
}

/* Größere Checkbox auf Mobile */
.check-input {
  width: 20px;
  height: 20px;
  accent-color: var(--c-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.check-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
}

.check-price { font-size: 0.8rem; font-weight: 700; color: var(--c-primary-dark); }

/* ── Preisübersicht ────────────────────────────────────── */
.price-summary {
  background: #f0faf0;
  border: 1.5px solid #b8ddb8;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 8px 0 14px;
}

.price-summary-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  padding: 3px 0;
}

.price-line span:last-child { font-weight: 600; color: var(--c-text); white-space: nowrap; }

.price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1.5px solid #b8ddb8;
  padding-top: 8px;
  margin-top: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-primary-dark);
}

.price-total-row strong { font-size: 1.15rem; color: var(--c-primary-dark); }

/* map-hidden: Karte wird per JS ausgeblendet (desktop: grid-area entfernt) */

/* ══════════════════════════════════════════════════════════
   TABLET  (600–899px)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 600px) and (max-width: 899px) {
  .map-wrapper {
    height: 82vh;
    min-height: 380px;
    max-height: 92vh;
  }

  .acc-grid { grid-template-columns: repeat(3, 1fr); }

  .sidebar { padding: 16px 20px 60px; }

  #step-dates { margin: 0 20px; }

}

/* ══════════════════════════════════════════════════════════
   KLEINE SMARTPHONES  ≤ 400px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
  .logo-sub { display: none; }
  .logo-img  { height: 54px; }
  .logo-icon { font-size: 30px; }

  .map-wrapper {
    height: 82vh;
    min-height: 340px;
  }

  .acc-grid { gap: 5px; }
  .acc-inner { padding: 8px 4px; min-height: 54px; }
  .acc-name { font-size: 0.75rem; }
  .acc-price { font-size: 0.7rem; }

  /* pin-size: Fallback 26px greift direkt aus CSS */

  .form-row-2 { grid-template-columns: 85px 1fr; }
}

/* ══════════════════════════════════════════════════════════
   LANDSCAPE auf Smartphones
   ══════════════════════════════════════════════════════════ */
@media (max-height: 500px) and (max-width: 900px) and (orientation: landscape) {
  .map-wrapper {
    height: 80vh;
    min-height: 180px;
    max-height: 85vh;
  }

  .site-header { height: 44px; }
  :root { --header-h: 44px; }
}

/* ── Rechtlicher Footer ─────────────────────────────────────────────────────── */
.site-footer-legal {
  background: #f4f6f8;
  border-top: 1px solid #e0e0e0;
  padding: 12px 20px;
  margin-top: 32px;
}
.site-footer-legal-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .8rem;
  color: #888;
}
.site-footer-legal a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
}
.site-footer-legal a:hover { color: #1b5e20; text-decoration: underline; }
.site-footer-legal-copy { margin-left: auto; }
