/**
 * Connector-specific styles. The heavy lifting is legacy-frontend.css —
 * the full Campsite Booking System front-end stylesheet — so the cloud
 * wizard looks identical to the classic booking form. Everything here just
 * lays out the few structures the connector renders differently.
 */

.tpcbsc-root { margin: 0 auto; }

/* Date/party/details field grid (legacy lays these out per-template). */
.tpcbsc-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px 16px;
  margin: 18px 0;
}
.tpcbsc-field-grid .tpcbs-form-group { margin: 0; display: flex; flex-direction: column; gap: 6px; }

/* Pitch slot cards stack */
.tpcbsc-slot-list { display: grid; gap: 14px; margin: 18px 0; }
.tpcbsc-slot-list .tpcbs-slot-card { cursor: pointer; }

/* Actions row */
.tpcbsc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.tpcbsc-actions .tpcbs-back-link { margin: 0; }

/* Booking summary panel (details + resume steps) */
.tpcbsc-summary {
  background: #f4f8f4;
  border: 1px solid #dde7dd;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 14px 0 18px;
  line-height: 1.55;
}
.tpcbsc-summary-addon { color: #4a5f4a; font-size: 0.92em; }
.tpcbsc-summary-total { font-weight: 700; margin-top: 6px; }

/* Photo-count badge on slot-card photos (lightbox opener) */
.tpcbs-slot-card__photo { position: relative; cursor: zoom-in; }
.tpcbsc-photo-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  pointer-events: none;
}

/* Step screens (vehicle registration / your details) */
.tpcbs-step-subheading { font-weight: 700; margin: 18px 0 8px; }
.tpcbsc-checkbox-label { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0; font-size: 0.95em; cursor: pointer; }
.tpcbsc-checkbox-label input { margin-top: 3px; }
.tpcbsc-voucher { margin: 14px 0; }

/* Confirmation panel */
.tpcbsc-confirm {
  background: #f4f8f4;
  border: 1px solid #dde7dd;
  border-radius: 10px;
  padding: 22px;
  text-align: center;
}
.tpcbsc-confirm-ref { font-size: 1.25em; font-weight: 700; }
.tpcbsc-confirm-total { margin-top: 6px; }

/* Notes + errors */
.tpcbsc-note { color: #5c6b5c; }
.tpcbsc-note-warn { color: #a15c00; }
.tpcbsc-empty { color: #5c6b5c; font-style: italic; }
.tpcbsc-error {
  background: #fdf0ef;
  border: 1px solid #f0c7c2;
  color: #9c3428;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
}

/* The legacy sheet's #tpcbs-booking-form button reset outranks .tpcbs-btn
   inside the form — restate the button component at ID specificity. */
#tpcbs-booking-form .tpcbs-btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.5;
  transition: background 0.2s;
  background: #e8eef4;
  color: #1f2937;
}
#tpcbs-booking-form .tpcbs-btn--primary { background: #2271b1; color: #fff; }
#tpcbs-booking-form .tpcbs-btn--primary:hover { background: #135e96; color: #fff; }

/* Inline flow areas */
.tpcbsc-slots-area { margin-top: 22px; }
.tpcbsc-details-area { margin-top: 22px; scroll-margin-top: 20px; }
#tpcbs-booking-form .tpcbs-slot-card.is-selected {
  outline: 2px solid #2271b1;
  outline-offset: 1px;
}

/* ── Seasonal flow ────────────────────────────────────────────────────────
   The seasonal cards stack their lines, so name / type / price / full-season
   each get their own row. Previously these were inline spans and ran together
   as "S1Seasonal pitch£1520.55full season£2500.00". */
.tpcbs-seasonal-card__name {
  display: block;
  font-weight: 600;
  font-size: 1.05em;
  line-height: 1.3;
}
.tpcbs-seasonal-card__meta {
  display: block;
  font-size: 0.85em;
  opacity: 0.7;
  line-height: 1.4;
  margin-top: 0.15em;
}
.tpcbs-seasonal-card__price {
  display: block;
  font-weight: 600;
  margin-top: 0.35em;
}
.tpcbs-type-card--seasonal .tpcbs-seasonal-card__meta {
  margin-top: 0.25em;
}

/* Order summary on the seasonal details screen. A season let is a four-figure
   commitment, so what's being bought sits next to the form rather than the
   guest filling in a bare set of inputs and hoping. */
.tpcbs-seasonal-summary {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
  background: rgba(0, 0, 0, 0.02);
}
.tpcbs-seasonal-summary__title {
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 0.6rem;
}
.tpcbs-seasonal-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}
.tpcbs-seasonal-summary__row:first-of-type { border-top: 0; }
.tpcbs-seasonal-summary__label { opacity: 0.7; }
.tpcbs-seasonal-summary__value { font-weight: 600; text-align: right; }
.tpcbs-seasonal-summary__row:last-child .tpcbs-seasonal-summary__value { font-size: 1.1em; }
.tpcbs-step-subheading {
  font-size: 1.05em;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

/* Add-ons sold by the unit — "Visitor £5 each" — carry a stepper inside the
   chip. Only shown once the chip is ticked; see buildAddonStepper(). */
.tpcbs-addon-qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  vertical-align: middle;
}
.tpcbs-addon-qty-btn {
  width: 22px;
  height: 22px;
  line-height: 1;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.tpcbs-addon-qty-btn:disabled { opacity: .35; cursor: default; }
.tpcbs-addon-qty-count {
  min-width: 1.25em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
