/* ==========================================================================
   reserveren.css — styling for the reservation page (/api/reserveren/article.php)
   Add to the page with:
     <link rel="stylesheet" href="/assets/css/reserveren.css">
   placed AFTER the existing site.css link.

   Reuses the site's existing design tokens (--red, --surface, --ink-soft,
   --line, --r-md, etc.). Falls back to sensible values if a token is absent,
   so the page styles correctly even if a variable name differs in site.css.
   ========================================================================== */

:root {
  /* Local fallbacks — only used if site.css hasn't already defined these. */
  --rsv-red:        var(--red, #c4361f);
  --rsv-red-dark:   var(--red-dark, #a02a17);
  --rsv-ink:        var(--ink, #1d1b18);
  --rsv-ink-soft:   var(--ink-soft, #5c574f);
  --rsv-muted:      var(--muted, #8a847a);
  --rsv-surface:    var(--surface, #faf7f1);
  --rsv-line:       var(--line, #e4ded3);
  --rsv-line-soft:  var(--line-soft, #efe9df);
  --rsv-radius:     var(--r-md, 14px);
  --rsv-radius-sm:  var(--r-sm, 9px);
  --rsv-paper:      #ffffff;
}

/* --------------------------------------------------------------------------
   Summary card — the show title, date/location, and the seats badge
   -------------------------------------------------------------------------- */
.reserveer-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  background: var(--rsv-paper);
  border: 1px solid var(--rsv-line);
  border-left: 5px solid var(--rsv-red);
  border-radius: var(--rsv-radius);
  box-shadow: 0 8px 28px -18px rgba(40, 30, 20, .35);
}

.reserveer-summary > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.reserveer-summary h2 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  line-height: 1.15;
  color: var(--rsv-ink);
}

.reserveer-summary .meta {
  font-size: .98rem;
  line-height: 1.6;
  color: var(--rsv-ink-soft);
  margin-bottom: 14px;
}

.reserveer-summary .meta::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--rsv-red);
  vertical-align: middle;
}

/* Seats badge */
.reserveer-summary .seats {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 20px 24px;
  background: var(--rsv-surface);
  border: 1px solid var(--rsv-line);
  border-radius: var(--rsv-radius-sm);
  text-align: center;
}

.reserveer-summary .seats .big {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--rsv-red);
  font-variant-numeric: tabular-nums;
}

.reserveer-summary .seats .label {
  margin-top: 6px;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rsv-muted);
}

/* When nearly sold out, the badge calms to a neutral tone via .is-low */
.reserveer-summary .seats.is-low .big { color: var(--rsv-ink-soft); }

/* --------------------------------------------------------------------------
   Alerts — error and info notices
   -------------------------------------------------------------------------- */
.alert {
  padding: 16px 20px;
  border-radius: var(--rsv-radius-sm);
  font-size: .96rem;
  line-height: 1.6;
  border: 1px solid transparent;
}

.alert + .alert { margin-top: 14px; }

.alert-error {
  background: #fdecea;
  border-color: #f3c4bd;
  color: #8f2316;
  font-weight: 600;
}

.alert-info {
  background: var(--rsv-surface);
  border-color: var(--rsv-line);
  color: var(--rsv-ink-soft);
}

.alert-info strong { color: var(--rsv-ink); }

/* --------------------------------------------------------------------------
   Form card
   -------------------------------------------------------------------------- */
.form-card {
  padding: 32px;
  background: var(--rsv-paper);
  border: 1px solid var(--rsv-line);
  border-radius: var(--rsv-radius);
  box-shadow: 0 10px 34px -22px rgba(40, 30, 20, .4);
}

.form-card > h2 {
  color: var(--rsv-ink);
  border-bottom: 1px solid var(--rsv-line-soft);
  padding-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.field label {
  margin-bottom: 7px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--rsv-ink);
}

.field input {
  font-family: inherit;
  font-size: 1rem;
  color: var(--rsv-ink);
  padding: 12px 14px;
  background: var(--rsv-surface);
  border: 1.5px solid var(--rsv-line);
  border-radius: var(--rsv-radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field input::placeholder { color: var(--rsv-muted); opacity: .8; }

.field input:hover { border-color: var(--rsv-muted); }

.field input:focus {
  outline: none;
  background: var(--rsv-paper);
  border-color: var(--rsv-red);
  box-shadow: 0 0 0 3px rgba(196, 54, 31, .14);
}

/* Two-column rows that collapse to one column on narrow screens */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}

/* The fields inside a grid row shouldn't double the bottom margin */
.form-grid-2 .field { margin-bottom: 0; }

/* Number inputs: keep the steppers but give them room */
.field input[type="number"] { width: 100%; }

/* Submit row */
.form-card .btn,
.form-card .btn-ghost,
.form-card .btn-red {
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .reserveer-summary {
    flex-direction: column;
    padding: 24px;
  }
  .reserveer-summary .seats {
    align-self: stretch;
    flex-direction: row;
    gap: 12px;
    min-width: 0;
  }
  .reserveer-summary .seats .big { font-size: 2rem; }
  .form-card { padding: 24px; }
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-grid-2 .field { margin-bottom: 20px; }
  .form-grid-2 .field:last-child { margin-bottom: 0; }
}
