:root{--bg:#f6f7fb;--card:#fff;--muted:#6b7280;--border:#e5e7eb;--accent:#111827;}
*{box-sizing:border-box} body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:#111}
header{background:#fff;padding:14px 20px;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:10}
main{max-width:1000px;margin:20px auto;background:var(--card);padding:20px;border-radius:14px;box-shadow:0 6px 20px rgba(0,0,0,.06)}
h1,h2,h3{margin:0 0 10px}
.grid{display:grid;gap:12px}
.grid-2{grid-template-columns:1fr 1fr}
input,button,select{width:100%;padding:10px;border:1px solid var(--border);border-radius:10px;font-size:16px}
button{background:var(--accent);color:#fff;border:none;cursor:pointer}
button:hover{filter:brightness(.95)}
.muted{color:var(--muted)}
.card{background:#fafafa;border:1px solid #eee;border-radius:10px;padding:12px}
table{width:100%;border-collapse:collapse}
th,td{padding:8px;border-bottom:1px solid #eee;text-align:left}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;font-size:12px;border:1px solid var(--border);background:#fff}
.success{color:#065f46;background:#ecfdf5;padding:10px;border-radius:8px;border:1px solid #a7f3d0}
.error{color:#7f1d1d;background:#fef2f2;padding:10px;border-radius:8px;border:1px solid #fecaca}
.calendar{user-select:none}
.cal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-cell{border:1px solid #e5e7eb;border-radius:8px;min-height:58px;padding:6px;position:relative;background:#fff}
.cal-cell.muted{background:#f9fafb;color:#9ca3af}
.cal-cell .d{position:absolute;top:6px;right:8px;font-size:12px;color:#9ca3af}
.cal-cell.sel{outline:2px solid #111827;background:#eef2ff}
.cal-cell.booked{background:#fee2e2;border-color:#fecaca}
.cal-legend{display:flex;gap:8px;margin:6px 0}
.cal-legend > span{display:inline-flex;align-items:center;gap:6px}
.dot{width:12px;height:12px;border-radius:4px;display:inline-block;border:1px solid #e5e7eb}
.dot.free{background:#fff}
.dot.booked{background:#fecaca}
.dot.sel{background:#eef2ff;border-color:#111827}
footer{max-width:1000px;margin:12px auto;color:#6b7280;font-size:14px;text-align:center}
/* -----------------------------------------
   iOS Quickfix fÃ¼r Buchungsseite (Checkboxen)
   Ãœberschreibt Inline-Styles in booking.ejs
   ----------------------------------------- */

/* Verhindert, dass ein Grid-Item (2. Checkbox) "wegklappt" */
.grid2,
.grid-2 {
  min-width: 0 !important;
  grid-auto-rows: minmax(min-content, auto) !important;
  align-items: flex-end !important; /* statt 'end' â†’ stabiler in Safari */
}

/* Sichert die Breite der einzelnen Optionszeilen */
.inline-opt {
  min-width: 0 !important;
}

/* Stellt sicher, dass die Checkboxen in iOS sichtbar sind */
.inline-opt input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  vertical-align: middle;
  margin-right: 6px;
}
/* -----------------------------------------
   Mobile Fix: Kalender-Header (Monatsnavigation)
   ----------------------------------------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap; /* erlaubt Umbruch bei kleinen Screens */
}

/* Buttons kompakter gestalten */
.cal-head button {
  padding: 6px 8px;
  font-size: 14px;
  flex: 1 1 auto; /* gleichmäßige Verteilung, vermeidet Überlappung */
  min-width: 0;   /* Safari-Schutz */
  white-space: nowrap; /* kein Zeilenumbruch im Buttontext */
}

/* Monatsname in der Mitte automatisch umbrechen oder kleiner */
.cal-head h3,
.cal-head .month-title {
  font-size: 16px;
  text-align: center;
  flex: 1 1 100%;
  margin: 4px 0;
}

/* Auf größeren Bildschirmen wieder in eine Reihe */
@media (min-width: 480px) {
  .cal-head {
    flex-wrap: nowrap;
  }
  .cal-head h3,
  .cal-head .month-title {
    flex: 0 1 auto;
    margin: 0;
  }
}
