/* ============================================================
   booking.css — booking form layout & states
   ============================================================ */

.booking-inner { max-width: 640px; }

.booking-form {
  margin-top: 2rem;
  display: grid;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  box-shadow: var(--shadow);
}

.field { display: grid; gap: 0.4rem; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.field label { font-weight: 700; font-size: var(--fs-sm); color: var(--heading); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-sand);
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-aqua);
  box-shadow: 0 0 0 3px rgba(23, 195, 212, 0.22);
}

/* ---------------- Phone field: country-code selector ---------------- */
/* The dial-code button and the national-number input share one bordered
   shell, so they read as a single control (js/phoneinput.js drives it). */
.phone-input {
  position: relative;
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-sand);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.phone-input:focus-within {
  border-color: var(--c-aqua);
  box-shadow: 0 0 0 3px rgba(23, 195, 212, 0.22);
}
.phone-input.is-invalid {
  border-color: var(--accent-hover);
}
.phone-input.is-invalid:focus-within {
  box-shadow: 0 0 0 3px rgba(224, 90, 71, 0.18);
}
/* Strip the global .field input styling — the shell owns border/background. */
.phone-input input[type="tel"] {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.phone-input input[type="tel"]:focus {
  outline: none;
  border: none;
  box-shadow: none;
}
.phone-cc {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.7rem 0 0.9rem;
  border-right: 1.5px solid var(--c-line);
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  cursor: pointer;
}
.phone-cc-flag { font-size: 1.2rem; line-height: 1; }
.phone-cc-code { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.phone-cc-caret {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--dur) var(--ease);
}
.phone-input.is-open .phone-cc-caret { transform: rotate(180deg); }

.phone-pop {
  position: absolute;
  z-index: 50;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, 92vw);
  background: var(--surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.6rem;
  animation: qa-pop var(--dur) var(--ease);
}
.phone-pop[hidden] { display: none; }
.phone-pop .phone-search {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm);
  background: var(--c-sand);
  margin-bottom: 0.5rem;
}
.phone-pop .phone-search:focus {
  outline: none;
  border-color: var(--c-aqua);
  box-shadow: 0 0 0 3px rgba(23, 195, 212, 0.22);
}
.phone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}
.phone-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
}
.phone-opt[hidden] { display: none; }
.phone-opt-flag { font-size: 1.1rem; line-height: 1; }
.phone-opt-name { flex: 1 1 auto; color: var(--text); }
.phone-opt-code { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.phone-opt:hover,
.phone-opt.is-active { background: var(--c-aqua-soft); color: var(--c-deep); }
.phone-opt[aria-selected="true"] { font-weight: 800; }
.phone-noresult {
  padding: 0.6rem 0.55rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.phone-noresult[hidden] { display: none; }

/* Helper text + inline error shared by form fields */
.field-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.4;
}
.field-error {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-hover);
}
.field-error[hidden] { display: none; }

/* "Share details with Captain Carlos" block */
.share-details-desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------------- Themed date picker ---------------- */
.datepicker { position: relative; }
.dp-input { cursor: pointer; padding-right: 2.6rem; }
.dp-cal-ico {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  color: var(--c-ocean);
  pointer-events: none;
}
.dp-cal-ico svg { width: 20px; height: 20px; display: block; }

.dp-pop {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 0;
  width: min(300px, 86vw);
  background: var(--surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.8rem;
  animation: qa-pop var(--dur) var(--ease);
}
.dp-pop[hidden] { display: none; }

.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.dp-title { font-weight: 800; color: var(--heading); font-size: var(--fs-sm); }
.dp-nav {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--heading);
  transition: background var(--dur) var(--ease);
}
.dp-nav:hover { background: var(--bg-alt); }

.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow-cell {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.3rem 0;
  text-transform: capitalize;
}
.dp-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.dp-day.is-empty { visibility: hidden; }
.dp-day:not(.is-disabled):not(.is-selected):hover { background: var(--c-aqua-soft); color: var(--c-deep); }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--c-ocean); }
.dp-day.is-selected { background: var(--accent); color: #fff; font-weight: 800; }
.dp-day.is-disabled { color: var(--text-muted); opacity: 0.4; cursor: default; }

.dp-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--c-line);
}
.dp-clear, .dp-today {
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--c-ocean);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease);
}
.dp-clear:hover, .dp-today:hover { background: var(--bg-alt); }

/* Catch & Cook add-on inside the booking form (toggled by js/booking.js) */
.cc-addon {
  display: grid;
  gap: 0.6rem;
  border: 1.5px dashed var(--c-line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--bg-alt);
}
.cc-addon[hidden] { display: none; }
.cc-title { font-weight: 800; color: var(--heading); font-size: var(--fs-base); display: flex; align-items: center; gap: 0.4rem; }
.cc-q { color: var(--text-muted); font-size: var(--fs-sm); }
.cc-sublabel { font-weight: 700; font-size: var(--fs-sm); color: var(--heading); }
.cc-radios { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.cc-radio { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; cursor: pointer; }
.cc-radio input { width: auto; margin: 0; accent-color: var(--c-aqua); }
.cc-details { display: grid; gap: 0.9rem; margin-top: 0.2rem; }
.cc-details[hidden] { display: none; }

.booking-status {
  font-weight: 700;
  font-size: var(--fs-sm);
  min-height: 1.4em;
}
.booking-status.is-success { color: var(--c-ocean); }
.booking-status.is-error   { color: var(--accent-hover); }

.booking-form.is-sending .btn { opacity: 0.65; pointer-events: none; }

/* Prefer-to-chat note above the form */
.booking-lead-or {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

/* Two booking actions side by side (Request booking + Book on WhatsApp) */
.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.4rem;
}
.booking-actions .btn { flex: 1 1 200px; }
.booking-actions .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
@media (max-width: 480px) {
  .booking-actions .btn { flex-basis: 100%; }
}
