/* =========================================================================
   Booking modal
   Triggered by: any element with [data-book] or class="book-open"
   Netlify form: name="booking"
   ========================================================================= */

.book-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 36, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.book-backdrop.open {
  display: flex;
  opacity: 1;
}

.book-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  background: #ffffff;
  color: var(--ink);
  border-radius: 14px;
  box-shadow: 0 24px 64px -16px rgba(10,10,40,0.45), 0 2px 8px rgba(10,10,40,0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.26s ease;
  font-family: 'DM Sans', sans-serif;
}
.book-backdrop.open .book-modal { transform: none; }

.book-head {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.book-head h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.book-head p {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 6px;
  line-height: 1.45;
}
.book-close {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.book-close:hover { background: var(--bg-alt); color: var(--ink); }
.book-close svg { width: 16px; height: 16px; }

.book-body {
  padding: 22px 28px 26px;
  overflow-y: auto;
}

.book-form {
  display: grid;
  gap: 14px;
}
.book-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 540px) {
  .book-form .row-2 { grid-template-columns: 1fr; }
}
.book-field { display: flex; flex-direction: column; gap: 5px; }
.book-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.book-field label .req { color: var(--purple-600); margin-left: 2px; }
.book-field input,
.book-field select,
.book-field textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  padding: 10px 12px;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  width: 100%;
}
.book-field textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
.book-field input:focus,
.book-field select:focus,
.book-field textarea:focus {
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px rgba(106, 63, 214, 0.12);
}
.book-field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'><path d='M3 4.5l3 3 3-3' stroke='%23141424' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
}

.book-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.book-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.book-submit {
  appearance: none;
  border: none;
  background: var(--ink);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s, transform 0.18s;
}
.book-submit:hover { background: var(--purple-600); transform: translateY(-1px); }
.book-submit:disabled { opacity: 0.6; cursor: wait; transform: none; }
.book-submit svg { width: 14px; height: 14px; }

.book-fine {
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.45;
  max-width: 280px;
}
.book-fine a { color: var(--purple-600); text-decoration: underline; text-underline-offset: 2px; }

/* Success state */
.book-success {
  display: none;
  padding: 40px 28px 44px;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.book-success .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-mint);
  color: var(--ink);
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 6px;
}
.book-success .check svg { width: 26px; height: 26px; }
.book-success h4 {
  font-size: 22px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em;
}
.book-success p {
  font-size: 14.5px; color: var(--ink-soft); max-width: 380px; line-height: 1.5;
}
.book-modal.is-success .book-body,
.book-modal.is-success .book-head p { display: none; }
.book-modal.is-success .book-success { display: flex; }
.book-modal.is-success .book-head h3 { display: none; }

/* Build-time detection dummy form — Netlify needs the exact field names present in static HTML */
.book-dummy { position: absolute; left: -10000px; visibility: hidden; pointer-events: none; }
