/*
 * Public gastvisser booking pages (/reserveer, /reserveer/:token,
 * /reserveer/:token/annuleren).
 *
 * Composes shared primitives: .page-hero + .breadcrumb (_page_hero.css),
 * .container (_layout.css), .card/.card-body (_cards.css), .form-group/
 * .form-label/.form-input/.form-error (_forms.css), .btn (_buttons.css),
 * .badge (_badges.css). Only the booking-specific layout lives here.
 *
 * No literal colour values — colours route through var() tokens from
 * _tokens.css. See docs/design_system.md "Do Nots".
 */

/* Narrow column for the single-card detail flows (show + cancel-confirm).
 * Promote to a shared layout primitive if a second page needs it. */
.container-narrow {
  max-width: 38rem;
  margin-inline: auto;
}

.reservations-form-section {
  padding-block: 2.5rem 4rem;
}

/* Booking column: wider than the detail pages so the form card reads as one
 * composition with the full-width hero instead of a floating sliver. */
.reservations-booking {
  max-width: 44rem;
  margin-inline: auto;
}

@media (min-width: 48rem) {
  .reservations-booking .card-body {
    padding: 2rem;
  }
}

.reservations-form {
  display: grid;
  gap: 1.25rem;
}

/* The shared 360px .form-group cap is for short standalone forms; here the
 * grid owns the widths and fields span the card. */
.reservations-form .form-group {
  margin: 0;
  max-width: none;
}

/* Two-up naam/e-mail row on desktop. The [class*="-form-row"] overrides in
 * _forms.css un-cap the nested form-groups and let inputs compress. */
.reservations-form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .reservations-form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* The pre-rendered participant rows flow as items of the form grid, so a
 * fully hidden roster leaves no empty grid row (and no doubled gap). */
.reservations-participants {
  display: contents;
}

/* .form-group's display: flex (author style) would defeat the UA
 * stylesheet's [hidden] { display: none }; restate it so inactive rows
 * actually disappear. Caught by the reservation_booking system test. */
.reservations-participant-row[hidden] {
  display: none;
}

/* Dagdeel segmented pills. Real radios (visually hidden, still focusable)
 * wrapped in styled labels; state styling keys off :has(). */
.reservations-period-fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.reservations-period-pills {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

@media (min-width: 48rem) {
  .reservations-period-pills {
    grid-template-columns: repeat(3, 1fr);
  }
}

.reservations-period-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: .8rem 1rem;
  border: 1.5px solid var(--sand);
  border-radius: var(--r);
  background: var(--stone);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.reservations-period-pill:hover {
  border-color: var(--muted);
}

.reservations-period-pill:has(input:checked) {
  border-color: var(--forest);
  background: var(--cream);
}

.reservations-period-pill:has(input:checked) .reservations-period-label {
  color: var(--forest);
  font-weight: 700;
}

.reservations-period-pill:has(input:focus-visible) {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.reservations-period-pill:has(input:disabled) {
  border-color: var(--sand);
  background: var(--stone);
  cursor: not-allowed;
}

.reservations-period-pill:has(input:disabled) .reservations-period-label {
  color: var(--muted);
}

.reservations-period-label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

/* Hint the JS fills ("nog 7 plekken" / "vol"). Reserve a line so the pills
 * keep their height while empty (no layout jump when a date is picked). */
.reservations-period-spots {
  font-size: var(--fs-xs);
  color: var(--muted);
  min-height: 1.2em;
}

/* A disabled pill with a hint is a full dagdeel — tint the "vol" label. */
.reservations-period-pill:has(input:disabled) .reservations-period-spots:not(:empty) {
  color: var(--err-border);
  font-weight: 600;
}

.reservations-submit {
  justify-self: start;
}

@media (max-width: 30rem) {
  .reservations-submit {
    justify-self: stretch;
    justify-content: center;
    width: 100%;
  }
}

/* Reservation detail definition list (show + cancel-confirm). */
.reservation-detail {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
}

.reservation-detail dt {
  font-weight: 600;
  color: var(--muted);
}

.reservation-detail dd {
  margin: 0;
  color: var(--ink);
}

.reservations-cancel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.reservations-group-note {
  margin-top: 1.25rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.reservation-status-note {
  color: var(--muted);
}
