/* Booking modal */
html.modal-open, html.modal-open body { overflow: hidden; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 22, 33, 0.55);
}
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 660px;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 32px 64px -24px rgba(15, 22, 33, 0.5);
  outline: none;
}
@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-dialog { border-radius: 10px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 14px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}
.modal-title { margin: 0; font-size: 1.5rem; max-width: none; }
.modal-step {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
}
.modal-close svg { width: 14px; height: 14px; }
.modal-close:hover { border-color: var(--fg); }
.modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.modal-body { padding: 20px 24px 26px; }
@media (min-width: 640px) {
  /* Steps differ in height; a floor keeps the dialog from jumping between them. */
  .modal-body { min-height: 270px; }
}
@media (prefers-color-scheme: dark) {
  .modal-backdrop { background: rgba(5, 8, 12, 0.7); }
  .modal-dialog { border-color: var(--line-strong); }
}
@media (max-width: 480px) {
  .modal-head { padding: 18px 18px 12px; }
  .modal-body { padding: 16px 18px 22px; }
}

.tz-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  color: var(--fg-muted);
}
.tz-row select {
  max-width: 100%;
  min-height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background-color: var(--bg-elev);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23525a66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--fg);
  font: inherit;
  font-size: 0.88rem;
  line-height: 34px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.tz-row select::-ms-expand { display: none; }
@media (prefers-color-scheme: dark) {
  .tz-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%239ba5b4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
.tz-row select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.booking-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.booking-crumbs .link-btn { font-size: 0.9rem; }
.booking-crumbs span { color: var(--fg); }

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 8px;
}
.day-btn, .slot-btn {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.day-btn { display: grid; gap: 2px; }
.day-btn b { font-weight: 500; font-size: 0.95rem; }
.day-btn span { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--fg-muted); }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.slot-btn {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.day-btn:hover, .slot-btn:hover { border-color: var(--accent); }
.day-btn:focus-visible, .slot-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-btn[aria-pressed="true"], .slot-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(29, 78, 216, 0.1);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}
.day-btn b { color: var(--fg); }
.booking-hint, .booking-loading, .booking-empty { margin: 16px 0 0; font-size: 0.9rem; color: var(--fg-muted); }
.booking-loading { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; }

.booking-msg {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.92rem;
  line-height: 1.5;
}
.booking-msg[data-kind="error"] { border-left-color: #b91c1c; }
.booking-msg p { margin: 0; }
.booking-msg .link-btn { margin-top: 6px; font-size: 0.9rem; }

.form-grid { display: grid; gap: 14px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.88rem; color: var(--fg-muted); }
.field input, .field textarea {
  width: 100%;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field.has-error input, .field.has-error textarea { border-color: #b91c1c; }
.field .err { margin: 6px 0 0; font-size: 0.82rem; color: #b91c1c; }
@media (prefers-color-scheme: dark) {
  .field .err { color: #f87171; }
  .booking-msg[data-kind="error"] { border-left-color: #f87171; }
  .field.has-error input, .field.has-error textarea { border-color: #f87171; }
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 6px;
}
.form-note { font-size: 0.85rem; color: var(--fg-muted); }

.booking-done .booking-done-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.1;
  margin-bottom: 14px;
}
.booking-when {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.booking-done p { font-size: 0.97rem; }
.booking-done .form-actions { margin-top: 16px; }

