/* ════════════════════════════════════════════════════════════════════
   JCX BOOKING MODAL — luxe multi-step booking drawer
   Inherits --jcx-gold, --jcx-gold-2 tokens from styles.css
   ════════════════════════════════════════════════════════════════════ */

/* ── Overlay ───────────────────────────────────────────────── */
#jcxBkOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  isolation: isolate;
}

#jcxBkOverlay.open {
  display: flex;
  animation: jcx-bk-overlay-in 280ms ease both;
}

@keyframes jcx-bk-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal ─────────────────────────────────────────────────── */
.jcx-bk-modal {
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 147, 86, 0.3) transparent;
  animation: jcx-bk-modal-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes jcx-bk-modal-in {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Header ────────────────────────────────────────────────── */
.jcx-bk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 22px 0;
}

.jcx-bk-tour-label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #d4bd87;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  margin: 0;
}

.jcx-bk-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: rgba(245, 240, 231, 0.65);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 180ms ease, color 180ms ease;
  flex-shrink: 0;
}
.jcx-bk-close:hover { border-color: #b59356; color: #f5f0e7; }
.jcx-bk-close:focus-visible { outline: 2px solid #b59356; outline-offset: 2px; }

/* ── Progress bar ──────────────────────────────────────────── */
.jcx-bk-progress {
  display: flex;
  align-items: center;
  padding: 18px 22px 0;
  gap: 0;
}

.jcx-bk-prog-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.jcx-bk-prog-step::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 6px;
  transition: background 300ms ease;
}
.jcx-bk-prog-step:last-child::after { display: none; }
.jcx-bk-prog-step.done::after { background: rgba(181, 147, 86, 0.4); }

.jcx-bk-prog-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(245, 240, 231, 0.35);
  font-size: 11px;
  font-weight: 700;
  font-family: "Montserrat", sans-serif;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 260ms ease, border-color 260ms ease, color 260ms ease;
}

.jcx-bk-prog-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.32);
  white-space: nowrap;
  transition: color 260ms ease;
}

.jcx-bk-prog-step.active .jcx-bk-prog-dot {
  background: #b59356;
  border-color: #b59356;
  color: #111;
}
.jcx-bk-prog-step.active .jcx-bk-prog-label { color: #f5f0e7; }

.jcx-bk-prog-step.done .jcx-bk-prog-dot {
  background: rgba(181, 147, 86, 0.2);
  border-color: #b59356;
  color: #d4bd87;
}
.jcx-bk-prog-step.done .jcx-bk-prog-label { color: rgba(245, 240, 231, 0.5); }

/* ── Panels ────────────────────────────────────────────────── */
.jcx-bk-panel { padding: 22px; }

.jcx-bk-panel[hidden] { display: none; }

.jcx-bk-panel h2 {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: clamp(30px, 6vw, 40px);
  text-transform: lowercase;
  color: #f5f0e7;
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

/* ── Calendar ──────────────────────────────────────────────── */
.jcx-bk-cal-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.jcx-bk-cal-arrow {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 240, 231, 0.65);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 180ms ease, color 180ms ease;
}
.jcx-bk-cal-arrow:hover { border-color: #b59356; color: #f5f0e7; }

.jcx-bk-cal-month-label {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: #f5f0e7;
}

.jcx-bk-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.jcx-bk-cal-dow {
  text-align: center;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  color: rgba(245, 240, 231, 0.3);
  padding-bottom: 6px;
  padding-top: 2px;
}

.jcx-bk-cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 240, 231, 0.78);
  font-size: 12.5px;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 130ms ease, color 130ms ease, border-color 130ms ease;
  padding: 0;
}

.jcx-bk-cal-day:hover:not([disabled]) {
  background: rgba(181, 147, 86, 0.14);
  color: #f5f0e7;
}

.jcx-bk-cal-day.today {
  border-color: rgba(181, 147, 86, 0.35);
}

.jcx-bk-cal-day.selected {
  background: #b59356;
  border-color: #b59356;
  color: #111;
  font-weight: 700;
}

.jcx-bk-cal-day[disabled] {
  color: rgba(245, 240, 231, 0.18);
  cursor: not-allowed;
}

/* ── Passengers stepper ────────────────────────────────────── */
.jcx-bk-pass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.jcx-bk-pass-info strong {
  display: block;
  font-size: 13px;
  color: #f5f0e7;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
}

.jcx-bk-pass-info small {
  font-size: 11px;
  color: rgba(245, 240, 231, 0.4);
  font-family: "Montserrat", sans-serif;
}

.jcx-bk-num-input {
  width: 90px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: #f5f0e7;
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 26px;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.jcx-bk-num-input::-webkit-outer-spin-button,
.jcx-bk-num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jcx-bk-num-input:focus { outline: 2px solid #b59356; border-color: #b59356; }

.jcx-bk-pass-num {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 32px;
  color: #f5f0e7;
  min-width: 28px;
  text-align: center;
  line-height: 1;
}

/* ── Price preview ─────────────────────────────────────────── */
.jcx-bk-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(181, 147, 86, 0.1), rgba(181, 147, 86, 0.03));
  border: 1px solid rgba(181, 147, 86, 0.22);
  border-radius: 8px;
}

.jcx-bk-price-row span {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 240, 231, 0.5);
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}

.jcx-bk-price-val {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 28px;
  color: #d4bd87;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ── Status text ───────────────────────────────────────────── */
.jcx-bk-status {
  font-size: 12.5px;
  font-family: "Montserrat", sans-serif;
  color: #e8a89e;
  margin: 10px 0 0;
  min-height: 16px;
}

.jcx-bk-status.ok { color: #8fb87a; }

/* ── Button row ────────────────────────────────────────────── */
.jcx-bk-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.jcx-bk-btn-row .jcx-button { flex: 1; margin-top: 0; }

/* Trigger button reset (for <button> elements using .jcx-button) */
button.jcx-button {
  cursor: pointer;
}

/* ── Guest form ────────────────────────────────────────────── */
.jcx-bk-form {
  display: grid;
  gap: 13px;
}

.jcx-bk-form label {
  display: grid;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.6);
}

.jcx-bk-form label.opt { color: rgba(245, 240, 231, 0.38); }

.jcx-bk-form input,
.jcx-bk-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #f5f0e7;
  font-size: 14px;
  font-family: "Montserrat", sans-serif;
  padding: 11px 14px;
  transition: border-color 180ms ease, background 180ms ease;
  text-transform: none;
  letter-spacing: 0;
}

.jcx-bk-form input:focus,
.jcx-bk-form textarea:focus {
  outline: none;
  border-color: #b59356;
  background: rgba(181, 147, 86, 0.04);
}

.jcx-bk-form textarea {
  resize: vertical;
  min-height: 74px;
  line-height: 1.5;
}

/* ── Summary card ──────────────────────────────────────────── */
.jcx-bk-summary {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
}

.jcx-bk-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.jcx-bk-sum-row:last-child { border-bottom: none; }

.jcx-bk-sum-row span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245, 240, 231, 0.45);
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
}

.jcx-bk-sum-row strong {
  font-size: 13.5px;
  color: #f5f0e7;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  text-align: right;
}

.jcx-bk-sum-total {
  background: rgba(181, 147, 86, 0.07);
}

.jcx-bk-sum-total span { color: rgba(245, 240, 231, 0.7); font-weight: 600; }

.jcx-bk-sum-total strong {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 26px;
  color: #d4bd87;
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* ── Secure note ───────────────────────────────────────────── */
.jcx-bk-secure {
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: rgba(245, 240, 231, 0.3);
  font-family: "Montserrat", sans-serif;
  margin: 14px 0 0;
}

/* ── Confirmation screen ───────────────────────────────────── */
.jcx-bk-confirm {
  text-align: center;
  padding: 8px 0 20px;
}

.jcx-bk-tick {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #b59356, #7a5e2a);
  color: #111;
  font-size: 32px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  animation: jcx-bk-tick-pop 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes jcx-bk-tick-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.jcx-bk-confirm h2 {
  text-align: center;
  margin-bottom: 10px;
}

.jcx-bk-confirm p {
  font-size: 13.5px;
  color: rgba(245, 240, 231, 0.65);
  font-family: "Montserrat", sans-serif;
  margin: 4px 0;
}

.jcx-bk-confirm strong {
  color: #f5f0e7;
  font-size: 14px;
}

.jcx-bk-ref {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 28px;
  color: #d4bd87;
  letter-spacing: 0.1em;
  display: block;
  margin: 6px 0 18px;
}

.jcx-bk-confirm .jcx-button {
  margin-top: 12px;
}

/* ── Responsive — mobile slides up from bottom ─────────────── */
@media (max-width: 580px) {
  #jcxBkOverlay {
    align-items: flex-end;
    padding: 0;
  }

  .jcx-bk-modal {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
    animation: jcx-bk-modal-up 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes jcx-bk-modal-up {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0);    }
  }

  .jcx-bk-prog-label { display: none; }

  .jcx-bk-btn-row { flex-direction: column; }
  .jcx-bk-btn-row .jcx-button { width: 100%; }
}

/* ── Inline card frame ─────────────────────────────────────── */
.jcx-card-frame {
  margin: 14px 0 4px;
  min-height: 48px;
}
.jcx-bk-loading {
  font-size: 13px;
  color: rgba(245, 240, 231, 0.45);
  text-align: center;
  padding: 12px 0;
  margin: 0;
}

/* ── Time slot selector ────────────────────────────────────── */
.jcx-bk-section-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 240, 231, 0.4);
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  margin: 16px 0 8px;
}

.jcx-bk-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.jcx-bk-slot-btn {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 240, 231, 0.7);
  font-size: 12px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.jcx-bk-slot-btn:hover {
  border-color: #b59356;
  color: #f5f0e7;
  background: rgba(181, 147, 86, 0.08);
}
.jcx-bk-slot-btn.active {
  background: #b59356;
  border-color: #b59356;
  color: #111;
  font-weight: 700;
}

/* ── Minimum guests note ───────────────────────────────────── */
.jcx-bk-min-note {
  font-size: 11px;
  color: rgba(245, 240, 231, 0.3);
  font-family: "Montserrat", sans-serif;
  text-align: center;
  margin: 8px 0 0;
  letter-spacing: 0.04em;
}

/* ── Add-on rows (modal) ───────────────────────────────────── */
.jcx-bk-addon-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}
.jcx-bk-addon-row:hover {
  border-color: rgba(181, 147, 86, 0.3);
  background: rgba(181, 147, 86, 0.04);
}
.jcx-bk-addon-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #b59356;
  flex-shrink: 0;
  cursor: pointer;
}
.jcx-bk-addon-label {
  flex: 1;
  font-size: 13px;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.85);
}
.jcx-bk-addon-price {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 16px;
  color: #d4bd87;
  white-space: nowrap;
}
.jcx-bk-addon-price em {
  font-style: normal;
  font-size: 10px;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.38);
  letter-spacing: 0.06em;
}

/* ── Add-ons list (page) ───────────────────────────────────── */
.jcx-addon-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.jcx-addon-page-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}
.jcx-addon-page-name {
  font-size: 13.5px;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.85);
}
.jcx-addon-page-price {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 17px;
  color: #d4bd87;
}
.jcx-addon-page-price span {
  font-size: 10px;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.4);
  margin-left: 2px;
}

/* ── Inline enquiry section (custom & rental pages) ────────── */
.jcx-enquiry-section {
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.jcx-enquiry-section h3 {
  font-family: "Bebas Neue", Georgia, serif;
  font-size: 28px;
  color: #f5f0e7;
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}
.jcx-enquiry-section > p {
  font-size: 13px;
  color: rgba(245, 240, 231, 0.5);
  font-family: "Montserrat", sans-serif;
  margin: 0 0 18px;
  line-height: 1.6;
}
.jcx-enq-form {
  display: grid;
  gap: 12px;
}
.jcx-enq-form label {
  display: grid;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
  color: rgba(245, 240, 231, 0.5);
}
.jcx-enq-form input,
.jcx-enq-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f5f0e7;
  font-size: 14px;
  font-family: "Montserrat", sans-serif;
  padding: 11px 14px;
  transition: border-color 180ms ease;
  letter-spacing: 0;
  text-transform: none;
}
.jcx-enq-form input:focus,
.jcx-enq-form textarea:focus { outline: none; border-color: #b59356; }
.jcx-enq-form textarea { resize: vertical; min-height: 80px; }
.jcx-enq-status {
  font-size: 12.5px;
  font-family: "Montserrat", sans-serif;
  min-height: 16px;
  color: #e8a89e;
  margin: 0;
}
.jcx-enq-status.ok { color: #8fb87a; }
.jcx-enq-submit { width: 100%; margin-top: 4px; }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #jcxBkOverlay.open,
  .jcx-bk-modal,
  .jcx-bk-tick {
    animation: none !important;
  }
}
