/* =============================================================
   Beach-Buchung VfL Oythe – gemeinsames Design (Rot/Weiß/Schwarz)
   ============================================================= */
:root {
  --red: #e30613;
  --red-dark: #a30510;
  --red-light: #fdeaea;
  --black: #1a1a1a;
  --ink: #1e1e1e;
  --ink-soft: #55555c;
  --gray: #9d9d9c;
  --gray-light: #f1f1f3;
  --border: #e3e3e6;
  --green: #16a34a;
  --green-light: #dcfce7;
  --sun: #e8a013;
  --bg: #f7f5f2;
  --f1: #e30613;
  --f2: #1a1a1a;
  --f3: #e8a013;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.55;
}
.topbar {
  background: linear-gradient(120deg, #111 0%, #3a0509 55%, var(--red) 100%);
  color: #fff; padding: 14px 20px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topbar .badge {
  background: #fff; color: var(--red); font-weight: 800; border-radius: 8px;
  padding: 4px 10px; font-size: 14px; letter-spacing: 0.5px;
}
.topbar h1 { font-size: 17px; font-weight: 700; }
.topbar .sub { font-size: 12.5px; opacity: 0.85; width: 100%; }
main { max-width: 1080px; margin: 0 auto; padding: 16px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
button {
  font-family: inherit; cursor: pointer; border: 1px solid var(--border);
  background: #fff; border-radius: 9px; padding: 8px 14px; font-size: 14px; color: var(--ink);
}
button.primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
button.primary:hover { background: var(--red-dark); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
input, select, textarea {
  font-family: inherit; font-size: 14.5px; padding: 9px 12px;
  border: 1px solid #cbd0d6; border-radius: 9px; width: 100%; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: var(--red); }
label { font-size: 13px; font-weight: 600; display: block; margin: 12px 0 4px; }
label .star { color: var(--red); }
.msg-error {
  background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 10px 0;
}
.msg-ok {
  background: var(--green-light); border: 1px solid #86efac; color: #14532d;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; margin: 10px 0;
}
.hidden { display: none !important; }

/* ---------- Kalender ---------- */
.cal-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-title { font-weight: 800; font-size: 16px; }
.cal-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; margin: 8px 0 12px; align-items: center; color: var(--ink-soft); }
.legend .item { display: flex; align-items: center; gap: 5px; }
.swatch { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.cal-scroll { overflow-x: auto; }
table.cal { border-collapse: collapse; width: 100%; min-width: 720px; }
table.cal th, table.cal td { border: 1px solid var(--border); text-align: center; }
table.cal th { background: var(--gray-light); padding: 7px 4px; font-size: 12.5px; }
table.cal th.today-col { background: var(--red-light); color: var(--red-dark); }
table.cal td.hour { background: var(--gray-light); font-weight: 700; padding: 0 8px; white-space: nowrap; font-size: 12px; }
.slot-group { display: flex; gap: 2px; padding: 3px; }
.slot {
  flex: 1; height: 30px; border-radius: 6px; font-size: 10.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; color: #fff; border: none; padding: 0;
}
.slot.free { background: var(--green-light); color: var(--green); border: 1.5px dashed #86efac; cursor: pointer; }
.slot.free:hover { background: #bbf7d0; transform: scale(1.05); }
.slot.booked { cursor: default; }
.slot.blocked { background: var(--gray); cursor: default; }
.slot.past { background: #ececee; color: #b5b5ba; cursor: default; }
.slot.closed { background: transparent; border: none; cursor: default; }
.day-closed { font-size: 11px; color: var(--ink-soft); padding: 8px 2px; }

/* Mobile: Tagesansicht */
.day-picker { display: none; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; }
.day-picker button { white-space: nowrap; font-size: 13px; padding: 7px 11px; }
.day-picker button.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 50;
  display: flex; align-items: flex-start; justify-content: center; padding: 20px; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 16px; max-width: 520px; width: 100%;
  padding: 22px; margin: 20px 0; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h2 { font-size: 19px; margin-bottom: 4px; color: var(--black); }
.slot-summary {
  background: var(--red-light); border: 1px solid #f5b5b9; border-radius: 10px;
  padding: 10px 14px; font-size: 14px; margin: 12px 0; font-weight: 600;
}
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) { .row2 { grid-template-columns: 1fr; } }
.toggle { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.toggle button { flex: 1; border: none; border-radius: 0; padding: 10px; font-weight: 600; background: #fff; }
.toggle button.active { background: var(--red); color: #fff; }
.checkline { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 4px; font-size: 13.5px; }
.checkline input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--red); }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions button { flex: 1; padding: 12px; font-size: 15px; }
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

footer { text-align: center; padding: 24px; font-size: 12px; color: var(--ink-soft); }
footer a { color: var(--ink-soft); }

@media (max-width: 700px) {
  .week-only { display: none; }
  .day-picker { display: flex; }
  table.cal { min-width: 0; }
}
