:root {
  --booking-ink: #17201d;
  --booking-muted: #6d746f;
  --booking-green: #164c3d;
  --booking-green-soft: #e8eee9;
  --booking-red: #bd4934;
  --booking-red-soft: #f8e6df;
  --booking-paper: #fffdfa;
  --booking-line: #e4dfd7;
  --booking-bg: #f7f3ed;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--booking-ink);
  background: var(--booking-bg);
  font-family: Arial, Helvetica, sans-serif;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }

.booking-container {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

/* Top menu: see css/header.css */

.booking-page { padding: 44px 0 70px; }
.booking-step-label {
  margin: 0 0 10px;
  color: var(--booking-red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .24em;
}

.booking-section-heading h2, .booking-summary h2 {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
}


.booking-toolbar,
.booking-calendar-panel,
.booking-summary,
.booking-contact-panel {
  background: var(--booking-paper);
  border: 1px solid var(--booking-line);
  border-radius: 8px;
}

.booking-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 22px;
  align-items: end;
  padding: 24px;
  margin-bottom: 20px;
}

.booking-field label, .booking-form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.booking-field select,
.booking-form-field input,
.booking-form-field textarea {
  width: 100%;
  border: 1px solid #d9d5ce;
  border-radius: 5px;
  background: white;
  color: var(--booking-ink);
  padding: 13px 14px;
  outline: none;
}

.booking-field select:focus,
.booking-form-field input:focus,
.booking-form-field textarea:focus {
  border-color: var(--booking-green);
  box-shadow: 0 0 0 3px #164c3d18;
}

.booking-week-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
}

.booking-week-controls strong { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; text-align: center; }
.booking-nav-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--booking-line);
  background: white;
  border-radius: 5px;
  color: var(--booking-ink);
  font-size: 20px;
}
.booking-nav-button:disabled { opacity: .35; cursor: not-allowed; }

.booking-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}

.booking-calendar-panel { padding: 26px; min-width: 0; }
.booking-section-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 20px; }
.booking-section-heading h2, .booking-summary h2 { font-size: 29px; }
.booking-live-label, .booking-required-note {
  color: var(--booking-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}
.booking-help { color: var(--booking-muted); font-size: 14px; margin: 0 0 18px; }

.booking-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--booking-line);
  border-radius: 6px;
  overflow: hidden;
}

.booking-day { min-width: 0; border-right: 1px solid var(--booking-line); background: #fff; }
.booking-day:last-child { border-right: 0; }
.booking-day-header { padding: 15px 6px; text-align: center; background: #fbf9f5; border-bottom: 1px solid var(--booking-line); }
.booking-day-name { display: block; font-weight: 700; font-size: 13px; }
.booking-day-date { display: block; margin-top: 5px; color: var(--booking-muted); font-size: 12px; }
.booking-day.is-selected .booking-day-header { background: var(--booking-green); color: white; }
.booking-day.is-selected .booking-day-date { color: #dbe8e1; }
.booking-day-slots { display: flex; flex-direction: column; gap: 8px; padding: 10px 7px; }

.booking-slot {
  width: 100%;
  min-height: 37px;
  padding: 8px 3px;
  border: 1px solid #cbd4ce;
  border-radius: 5px;
  background: white;
  color: var(--booking-ink);
  font-size: 12px;
  font-weight: 700;
}
.booking-slot:hover:not(:disabled) { border-color: var(--booking-green); }
.booking-slot.is-selected { background: var(--booking-green); border-color: var(--booking-green); color: white; }
.booking-slot:disabled { background: #f0eeeb; color: #aaa6a0; border-color: #f0eeeb; cursor: not-allowed; }
.booking-no-slots { padding: 16px 5px; color: #aaa6a0; text-align: center; font-size: 12px; }

.booking-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; color: var(--booking-muted); font-size: 12px; }
.booking-legend span { display: inline-flex; align-items: center; gap: 7px; }
.booking-dot { width: 11px; height: 11px; display: inline-block; border-radius: 50%; background: #ddd; }
.booking-dot-available { background: var(--booking-green); }
.booking-dot-unavailable { background: #d9d6d0; }
.booking-dot-selected { background: white; border: 3px solid var(--booking-green); }

.booking-summary { padding: 26px; position: sticky; top: 20px; }
.booking-summary-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: var(--booking-red-soft); color: var(--booking-red);
  font-weight: 800; margin-bottom: 20px;
}
.booking-summary .booking-step-label { margin-bottom: 8px; }
.booking-summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 17px 0; border-bottom: 1px solid var(--booking-line); font-size: 13px; }
.booking-summary-row span { color: var(--booking-muted); }
.booking-summary-row strong { text-align: right; font-weight: 700; }
.booking-summary-note { margin: 22px 0 0; color: var(--booking-muted); font-size: 12px; line-height: 1.6; }

.booking-contact-panel { margin-top: 20px; padding: 28px; }
.booking-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.booking-form-full { grid-column: 1 / -1; }
.booking-form-field textarea { resize: vertical; min-height: 110px; }
.booking-form-footer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 25px; padding-top: 6px; }
.booking-form-footer p { max-width: 450px; margin: 0; color: var(--booking-muted); font-size: 12px; line-height: 1.6; }
.booking-submit { border: 0; border-radius: 5px; padding: 15px 25px; background: var(--booking-red); color: white; font-weight: 700; }
.booking-submit:hover { background: #a83f2d; }
.booking-success { margin-top: 20px; padding: 16px; background: var(--booking-green-soft); color: var(--booking-green); border-radius: 5px; line-height: 1.5; }

@media (max-width: 900px) {
  .booking-toolbar { grid-template-columns: 1fr 1fr; }
  .booking-week-controls { grid-column: 1 / -1; }
  .booking-main-grid { grid-template-columns: 1fr; }
  .booking-summary { position: static; }
}

@media (max-width: 650px) {
  .booking-container { width: min(100% - 28px, 1180px); }
  .booking-page { padding-top: 35px; }
  .booking-toolbar, .booking-calendar-panel, .booking-summary, .booking-contact-panel { padding: 18px; }
  .booking-toolbar { grid-template-columns: 1fr; }
  .booking-week-controls { grid-column: auto; }
  .booking-week-grid { overflow-x: auto; grid-template-columns: repeat(7, minmax(94px, 1fr)); }
  .booking-section-heading, .booking-form-footer { flex-direction: column; align-items: flex-start; }
  .booking-live-label, .booking-required-note { text-align: left; }
  .booking-form { grid-template-columns: 1fr; gap: 16px; }
  .booking-form-full { grid-column: auto; }
  .booking-form-footer { gap: 16px; }
  .booking-submit { width: 100%; }
}

/* ---- live data states (js/booking.js + php/booking.php) ---- */
.booking-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.booking-form { position: relative; }
.booking-field select:disabled { opacity: .55; cursor: not-allowed; }
.booking-week-grid[aria-busy="true"] { opacity: .45; transition: opacity .15s; }
.booking-week-grid.is-error { display: block; padding: 22px; color: #8a2a1b; background: #fbecea; border-color: #efc1b9; font-size: 14px; }
.booking-submit:disabled { opacity: .7; cursor: wait; }
.booking-success.is-error { background: #fbecea; color: #8a2a1b; }
.booking-form-field input[aria-invalid="true"] { border-color: #b9482d; outline: 2px solid rgba(185, 72, 45, .2); }

/* phones: one row per day (day on the left, its times on the right) instead of 7 narrow columns */
@media (max-width: 650px) {
  .booking-week-grid { display: block; overflow: visible; }
  .booking-week-grid.is-error { padding: 16px; }
  .booking-day { display: grid; grid-template-columns: 76px 1fr; border-right: 0; border-bottom: 1px solid var(--booking-line); }
  .booking-day:last-child { border-bottom: 0; }
  .booking-day-header { display: flex; flex-direction: column; justify-content: center; padding: 10px 6px; border-bottom: 0; border-right: 1px solid var(--booking-line); }
  .booking-day-slots { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .booking-slot { width: auto; min-width: 70px; }
  .booking-no-slots { padding: 6px 4px; }
}
