/* ================================================================
   Buchungssystem – Öffentliche Seiten
   Erfordert: style.css (CSS Custom Properties)
   ================================================================ */

/* ---- Booking Layout ------------------------------------------ */
.booking-page {
  min-height: 100vh;
  background: var(--color-bg-warm);
  display: flex;
  flex-direction: column;
}

.booking-page main {
  flex: 1;
}

/* ---- Buchungstyp-Auswahl (index.html) ----------------------- */
.booking-types-section {
  padding: var(--section-pad-y) 0;
}

.booking-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
  justify-content: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.booking-type-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.booking-type-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.booking-type-card__name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0;
}

.booking-type-card__duration {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.booking-type-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.booking-type-card__cta {
  margin-top: auto;
}

/* ---- Termin-Buchungsseite (termin.html) --------------------- */
.booking-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 72px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: var(--space-lg) 0 var(--space-2xl);
}

/* Linke Spalte: Buchungstyp-Info */
.booking-info {
  background: var(--color-bg-stone);
  border-right: 1px solid var(--color-border);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.booking-info__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.booking-info__back:hover { color: var(--color-teal); }

.booking-info__name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0.5rem 0 0;
  line-height: 1.25;
}

.booking-info__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.booking-info__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0.5rem 0 0;
}

.booking-info__selected {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.88rem;
  color: var(--color-slate);
  display: none;
}

.booking-info__selected.is-visible { display: block; }

.booking-info__selected p {
  margin: 0.25rem 0;
}

/* Mittlere + rechte Spalte: Kalender + Slots */
.booking-main {
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
}

/* Kalender */
.booking-calendar {
  padding: 1.75rem;
  border-right: 1px solid var(--color-border);
}

.booking-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.booking-calendar__month {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-slate);
}

.booking-calendar__nav {
  display: flex;
  gap: 0.4rem;
}

.booking-calendar__nav-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-slate);
  transition: background var(--transition);
}

.booking-calendar__nav-btn:hover:not(:disabled) { background: var(--color-bg-stone); }
.booking-calendar__nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Kalender-Grid */
.booking-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.booking-cal-grid__day-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 0.4rem 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.booking-cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  color: var(--color-text-muted);
  border: 2px solid transparent;
}

.booking-cal-day--other-month { opacity: 0.25; pointer-events: none; }

.booking-cal-day--available {
  color: var(--color-teal);
  font-weight: 600;
  cursor: pointer;
}

.booking-cal-day--available:hover {
  background: rgba(61,122,110,0.12);
}

.booking-cal-day--today {
  border-color: var(--color-teal);
}

.booking-cal-day--selected {
  background: var(--color-teal) !important;
  color: #fff !important;
  font-weight: 700;
}

.booking-cal-day--disabled {
  opacity: 0.3;
  pointer-events: none;
}

.booking-cal-day--loading {
  pointer-events: none;
}

/* Zeitslots */
.booking-slots {
  width: 200px;
  border-left: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.booking-slots__header {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-stone);
}

.booking-slots__list {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.booking-slots__empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 1.5rem 1rem;
}

.booking-slot-row {
  display: flex;
  gap: 0.35rem;
}

.booking-slot-btn {
  flex: 1;
  padding: 0.5rem 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-teal);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.booking-slot-btn:hover { background: rgba(61,122,110,0.08); border-color: var(--color-teal); }

.booking-slot-btn--selected {
  background: var(--color-slate);
  border-color: var(--color-slate);
  color: #fff;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.booking-slot-next {
  padding: 0.5rem 0.6rem;
  background: var(--color-teal);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.booking-slot-next:hover { background: var(--color-teal-dark); }

/* Formular-Step */
.booking-form-step {
  display: none;
  padding: 1.75rem;
  grid-column: 1 / -1;
}

.booking-form-step.is-active { display: block; }

.booking-form-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 1.25rem;
}

.booking-location-opts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.booking-location-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  font-size: 0.92rem;
}

.booking-location-label:has(input:checked) {
  border-color: var(--color-teal);
  background: rgba(61,122,110,0.06);
}

.booking-location-label input[type="radio"] {
  accent-color: var(--color-teal);
}

/* ---- Bestätigungsseite -------------------------------------- */
.booking-confirm-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  max-width: 540px;
  margin: var(--space-lg) auto var(--space-2xl);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.booking-confirm-icon {
  width: 56px;
  height: 56px;
  background: rgba(61,122,110,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--color-teal);
}

.booking-confirm-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 0.5rem;
}

.booking-confirm-sub {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

.booking-confirm-details {
  background: var(--color-bg-stone);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.booking-confirm-details dt {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
}

.booking-confirm-details dd {
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 0.75rem;
}

/* ---- Stornierungsseite -------------------------------------- */
.booking-cancel-box {
  max-width: 480px;
  margin: var(--space-lg) auto var(--space-2xl);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.booking-cancel-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-slate);
  margin: 0 0 1rem;
}

/* ---- Ladeindikator ------------------------------------------ */
.booking-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  gap: 0.75rem;
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 960px) {
  .booking-layout {
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .booking-info {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .booking-main {
    grid-template-columns: 1fr;
  }

  .booking-slots {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--color-border);
    max-height: 260px;
  }
}

@media (max-width: 600px) {
  .booking-calendar { padding: 1rem; }
  .booking-form-step { padding: 1rem; }
  .booking-types-grid { grid-template-columns: 1fr; }
}
