/* styles.css */
:root {
  --bg: #1e293b;
  --card: #243246;
  --fg: #f1f5f9;
  --muted: #cbd5e1;
  --line: #3b4a61;
  --accent: #22d3ee;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(30, 41, 59, .96);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
}
/* Prevent main content from sliding under the fixed header */
main,
#main,
.hero {
  padding-top: 94px;
  /* adjust to your header’s actual height */
}

/* Responsive logo image */
.logo-img {
  max-height: 48px;
  /* adjust to fit header height */
  width: auto;
  /* maintain aspect ratio */
  height: auto;
  /* scale correctly */
  display: block;
}

.logo-text {
  margin-top: -0.5em;
  font-size: 26px;
  display: inline-flex;
    flex-direction: column;
}
.logo-text span {
  line-height: 1;
}
.logo-text .tight {
  margin-top: -0.4em;
}

@media (min-width: 768px) {
  .logo-img {
    max-height: 64px;
    /* slightly larger on bigger screens */
  }
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
}

.brand svg {
  width: 30px;
  height: 30px;
  display: block;
}

.links {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: .95rem;
}

.btn {
  display: inline-block;
  padding: .65rem .95rem;
  border-radius: .6rem;
  background: var(--accent);
  color: #00222b;
  font-weight: 700;
  border: 1px solid transparent;
}

.btn.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

.btn:hover {
  filter: brightness(1.05);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 2rem;
  align-items: center;
  padding: 3.2rem 0 2.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0rem;
  padding: 1.15rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .32rem .55rem;
  background: #16a34a;
  font-weight: bold;
}

h1 {
  font-size: clamp(2rem, 1.1rem + 2.6vw, 2.9rem);
  line-height: 1.15;
  margin: .6rem 0 1rem;
}

p.lead {
  color: #e2e8f0;
  font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .grid.cols-3,
  .grid.cols-2 {
    grid-template-columns: 1fr;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .5rem;
}

.chip {
  border: 1px solid var(--line);
  color: #e2e8f0;
  padding: .35rem .6rem;
  border-radius: .6rem;
  font-size: .85rem;
  background: transparent;
}

.section {
  padding: 2.3rem 0;
}

h2 {
  font-size: 1.6rem;
  margin: 0 0 .9rem;
}

.muted {
  color: var(--muted);
}

ul.clean {
  padding-left: 1.1rem;
  margin: .35rem 0 0;
}

.price {
  font-size: 1.45rem;
  font-weight: 800;
}

.badge {
  font-size: .75rem;
  border: 1px solid var(--line);
  padding: .15rem .45rem;
  border-radius: .45rem;
  color: #a7f3d0;
}

footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 1.4rem 0;
  color: #cbd5e1;
  font-size: .95rem;
}

.kicker {
  color: #cbd5e1;
  font-size: .9rem;
}

/* Newly added classes */
.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.05rem;
}

.card-title {
  margin-top: 0;
  margin-bottom: .3rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.contact-buttons {
  display: flex;
  gap: .6rem;
  margin-top: .8rem;
  margin-bottom: .6rem;
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Postcode checker styles */
#postcode-checker {
  margin-top: 1rem;
}

#postcode-checker label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#postcode-checker input {
  padding: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.25rem;
  margin-right: 0.5rem;
  width: 200px;
}

#postcode-checker button {
  padding: 0.5rem 1rem;
  border: none;
  background: #22c55e;
  color: #fff;
  font-weight: 600;
  border-radius: 0.25rem;
  cursor: pointer;
}

#postcode-checker button:hover {
  background: #16a34a;
}

#postcode-message {
  margin-top: 0.5rem;
  font-weight: 600;
}

#postcode-message.ok {
  color: #22c55e;
}

#postcode-message.no {
  color: #ef4444;
}

/* Modal */
.modal[hidden] {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .65);
}

.modal-card {
  position: relative;
  margin: 6vh auto;
  max-width: 720px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  width: min(94%, 720px);
  margin-top: 105px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
  border-radius: .5rem;
  padding: .35rem .55rem;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: .8rem;
}

.booking-form label {
  display: block;
  font-weight: 600;
  margin-bottom: .35rem;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  padding: .6rem .7rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #1f2a3b;
  color: var(--fg);
}

.booking-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-grid>div {
  min-width: 0;
}

@media (max-width: 900px) {
  .booking-grid {
    grid-template-columns: 1fr;
  }
}

.booking-msg {
  margin-top: .6rem;
  font-size: .95rem;
}

.booking-msg.ok {
  color: #86efac;
}

.booking-msg.err {
  color: #fca5a5;
}

/* Small tweak for the hero CTA row so the new button fits nicely */
.cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.05rem;
}

/* Busy state toggled by .is-busy on #bookingModal */
.modal.is-busy .modal-busy {
  opacity: 1;
  pointer-events: auto;
}

.modal-busy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  z-index: 2;
  /* above form content inside modal-card */
}

.modal-busy__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  /* fallback if your modal uses dark theme:
     background: rgba(0,0,0,0.3); */
}

.modal-busy__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* While busy, dim and block the form’s interactive elements */
.modal.is-busy .modal-card {
  filter: none;
}

.modal.is-busy .booking-form {
  pointer-events: none;
  user-select: none;
  opacity: 0.75;
}

.wa-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #16a34a;
  /* WhatsApp green */
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  text-decoration: none;
  z-index: 9000;
  transition: transform .12s ease, filter .12s ease;
}

.wa-fab:hover {
  transform: translateY(-2px);
  filter: brightness(0.95);
}

.wa-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

@media (max-width: 480px) {
  .wa-fab {
    right: 12px;
    bottom: 12px;
    width: 52px;
    height: 52px;
  }
}





/* Burger button style */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: inherit;
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  header .links {
    display: none;
    /* hide all links on mobile by default */
    flex-direction: column;
    gap: 0.5rem;
    position: absolute;
    top: 100%;
    /* below header */
    right: 1rem;
    background: #0a0f1c;
    /* dark dropdown */
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  }

  header .links.show {
    display: flex;
    /* shown when toggled */
  }

  .menu-toggle {
    display: block;
    /* show the burger */
  }

  /* always keep CTA styled consistently */
  header .links a.btn {
    margin-top: 0.5rem;
  }
}

/* SVG Icons */
.icon {
  width: 1.2em;
  /* scale with text size */
  height: 1.2em;
  vertical-align: middle;
  /* align with text */
  margin-right: 0.4em;
  /* spacing */
  flex-shrink: 0;
  display: inline-block;
}


/* Equal height cards in services section */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.service {
  display: flex;
  flex-direction: column;
}

.service .card-body {
  flex: 1;
  /* makes the body stretch to fill available space */
}

.service .card-footer {
  margin-top: auto;
  text-align: center;
  padding-top: 1rem;
}

.service .btn {
  width: 100%;
}


/* Pricing: equal-height cards with bottom-aligned buttons */
.pricing-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
}

.plan .card-body {
  flex: 1;
  /* stretches body to fill height */
}

.plan .card-footer {
  margin-top: auto;
  padding-top: 1rem;
  text-align: center;
}

.plan .btn {
  width: 100%;
}

/* Badge position */
.plan .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  background: #16a34a;
  color: #ffffff;
  font-weight: bold;
}

/* Price styling (optional, tweak to taste) */
.plan .price {
  font-size: clamp(2.25rem, 2.2vw, 1.6rem);
  font-weight: 700;
  margin: .25rem 0 .5rem;
}

.plan .saving {
  color: #16a34a;
  font-weight: bold;
}

/* Contact card */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* left = 1/3, right = 2/3 */
  gap: 1.5rem;
  margin-top: 1rem;
  align-items: center;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
}

.contact-info .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent, #2b8a3e);
  /* match your theme accent */
}

/* Stack columns on mobile */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }
}
.contact-buttons .btn {
  background: #16a34a;
  color: #ffffff;
  text-align: center;
}

section[id] {
  scroll-margin-top: 95px;
  /* match or slightly larger than header height */
}

/* --- Floorplan Modal --- */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.modal-content {
  position: relative;
  margin: 4rem auto;
  max-width: 1100px;
  width: clamp(300px, 92vw, 1100px);
  background: #0f1115;
  color: #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.icon-btn {
  background: transparent;
  border: 0;
  color: #9ca3af;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 0.75rem 1rem 1rem;
}

.fp-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.fp-btn {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  color: #e5e7eb;
}

.fp-btn:hover {
  background: #273244;
}

.fp-zoom {
  display: inline-flex;
  gap: 0.4rem;
  justify-self: center;
}

.fp-viewer {
  position: relative;
  height: min(70vh, 70dvh);
  background: #0b0d11;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
}

.fp-viewer img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
}

.fp-hint {
  position: absolute;
  bottom: 8px;
  left: 12px;
  font-size: 0.8rem;
  color: #9ca3af;
  opacity: 0.9;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px;
  border-radius: 8px;
}

.fp-caption {
  margin: 0.6rem 0 0.4rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  min-height: 1.2em;
}

.fp-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.fp-thumb {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.fp-thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.fp-thumb.active {
  outline: 2px solid #22c55e;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 3.5rem auto;
  }

  .fp-viewer {
    height: min(62vh, 62dvh);
  }
}

/* Hide default icon */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  /* invisible */
  position: absolute;
  /* removes it from flow but keeps it clickable */
  right: 0.75rem;
  width: 1.2em;
  height: 1.2em;
  cursor: pointer;
}

/* Add a custom white calendar icon */
input[type="date"] {
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='transparent' viewBox='0 0 24 24' stroke-width='1.5' stroke='white' class='size-6'><path stroke-linecap='round' stroke-linejoin='round' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12v-.008ZM12 15h.008v.008H12V15Zm0 2.25h.008v.008H12v-.008ZM9.75 15h.008v.008H9.75V15Zm0 2.25h.008v.008H9.75v-.008ZM7.5 15h.008v.008H7.5V15Zm0 2.25h.008v.008H7.5v-.008Zm6.75-4.5h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V15Zm0 2.25h.008v.008h-.008v-.008Zm2.25-4.5h.008v.008H16.5v-.008Zm0 2.25h.008v.008H16.5V15Z' /></svg>") no-repeat right 0.75rem center;
  background-size: 1.2em;
  padding-right: 2.2em;
  /* make space for icon */
  color-scheme: dark;
  /* keeps native text consistent in dark forms */
}

.notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #1e293b;
  /* pale yellow */
  color: #fef9c3;
  /* dark amber/brown */
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.notice-icon {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  color: #f59e0b;
  /* amber */
}


/* Space between form fields */
form#bookingForm input,
form#bookingForm select,
form#bookingForm textarea {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  /* adjust as needed */
}




/* Page lock only while booking modal is visible */
html:has(#bookingModal:not([hidden])),
body:has(#bookingModal:not([hidden])) {
  overflow: hidden;
}

/* Full-screen modal + backdrop */
#bookingModal {
  position: fixed;
  inset: 0;
  z-index: 1500;
}

#bookingModal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Make the CARD a flex column and let the FORM scroll */
#bookingModal .modal-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 5dvh;
  width: clamp(320px, 92vw, 720px);
  max-height: 90dvh;

  display: flex;
  flex-direction: column;

  /* visual styling (keep yours) */

  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);

  /* IMPORTANT: the card itself should NOT scroll */
  overflow: hidden;
}

/* Header + notice stay fixed at top of the card */
#bookingModal .modal-header,
#bookingModal .notice {
  flex: 0 0 auto;
  padding: 1rem;
}

/* The FORM is the scrollable area */
#bookingModal .booking-form {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 1rem 1rem;
  /* bottom padding so last fields aren’t clipped */
  overscroll-behavior: contain;
}

/* Ensure the action row participates in normal flow (no absolute positioning) */
#bookingModal .modal-actions {
  position: static;
  /* override anything earlier */
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

/* (Optional but nice) keep the buttons visible while scrolling */
@supports (position: sticky) {
  #bookingModal .modal-actions {
    position: sticky;
    bottom: 0;
    
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    /* edge-to-edge strip */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    display: flex;
      gap: .5rem;
      justify-content: flex-end;
  }
}

/* Make sure the booking message isn’t hidden behind the sticky bar */
#bookingModal #bookingMsg {
  margin-top: 0.75rem;
  text-align: center;
}


/* Hide WhatsApp FAB if ANY modal is visible */
html:has(#bookingModal:not([hidden])),
html:has(#floorplanModal:not(.hidden)) {
  /* scope to the FAB */
}

html:has(#bookingModal:not([hidden])) #waFab,
html:has(#floorplanModal:not(.hidden)) #waFab {
  display: none !important;
}

@media (max-width: 768px) {
  #bookingModal .modal-card {
    top: 0;
    /* closer to the top than the default 5dvh */
  }
}


/* Lock page scroll while the booking modal is visible (no JS needed) */
html:has(#bookingModal:not([hidden])),
body:has(#bookingModal:not([hidden])) {
  overflow: hidden;
}

/* Mobile / tablet layout */
@media (max-width: 900px) {

  /* Full-screen modal card */
  #bookingModal .modal-card {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100dvh;
    /* dynamic viewport -> plays well with keyboard */
    max-height: none;

    display: flex;
    flex-direction: column;

    /* your existing visual styles */
    background: #0f1115;
    color: #e5e7eb;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    overflow: hidden;
    /* the scroller is the child below */
  }

  /* Top bar stays visible; not sticky footer, only sticky header */
  #bookingModal .modal-header {
    flex: 0 0 auto;
    padding: 1rem;
    background: #0f1115;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* ONE scroll container for everything below the header */
  #bookingModal .modal-scroll {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
    /* comfy padding for content */
    padding-bottom: 1rem;
    /* small bottom space */
  }

  /* Normal flow buttons at the end of content (NOT sticky) */
  #bookingModal .modal-actions {
    position: static !important;
    /* neutralise any previous sticky */
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
    background: transparent;
    backdrop-filter: none;
  }

  /* Make inputs easier to reach when keyboard toggles */
  #bookingModal input,
  #bookingModal select,
  #bookingModal textarea {
    scroll-margin-bottom: 96px;
    /* gives focused fields breathing room */
  }
}

/* MOBILE/TABLET: force booking card to fill screen and reset desktop centering */
@media (max-width: 900px) {
  #bookingModal .modal-card {
    position: fixed !important;
    inset: 0 !important;
    /* top:0 right:0 bottom:0 left:0 */
    width: 100vw !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0;
    border-radius: 0;

    /* kill any desktop centering that pushes it left */
    left: 0 !important;
    right: 0 !important;
    transform: none !important;

    /* layout */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
  }

  /* one scroll area below the header */
  #bookingModal .modal-scroll {
    flex: 1 1 auto;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
  }

  /* buttons in normal flow (not sticky) to avoid keyboard issues */
  #bookingModal .modal-actions {
    position: static !important;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* Lock page scroll while booking modal is shown */
/* html:has(#bookingModal:not([hidden])),
body:has(#bookingModal:not([hidden])) { overflow: hidden; } */


/* Lock page while modal is visible */
html:has(#bookingModal:not([hidden])) body {
  overflow: hidden;
}

/* Mobile layout */
@media (max-width: 900px) {
  #bookingModal .modal-card {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100svh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    left: 0 !important;
    transform: none !important;
    /* nuke desktop centering on mobile */
  }

  #bookingModal .modal-header {
    flex: 0 0 auto;
  }

  /* ONE scroll area under the header */
  #bookingModal .modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    /* critical so it can actually scroll */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
  }

  /* Ensure the form itself is NOT another scroll box */
  #bookingModal .booking-form {
    overflow: visible !important;
  }
}


/* =========================
   Modal mobile overrides (single inner scroller)
   ========================= */
html.modal-open,
html.modal-open body {
  overflow: hidden;
}

@media (max-width: 900px) {
  #bookingModal .modal-card {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    /* better with mobile address/IME bars */
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* modal container never scrolls */
    left: 0 !important;
    transform: none !important;
  }

  #bookingModal .modal-header {
    flex: 0 0 auto;
    padding: 1rem;
    background: #0f1115;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* 👉 exactly one scrollable area on mobile */
  #bookingModal .modal-scroll {
    flex: 1 1 auto;
    min-height: 0;
    /* critical so it can actually scroll */
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem;
    padding-bottom: 1rem;
    /* JS will increase this when IME opens */
  }

  /* ensure the form itself is not a second scroll container */
  #bookingModal .booking-form {
    overflow: visible !important;
  }

  /* actions sit in flow; no sticky bar fighting the keyboard */
  #bookingModal .modal-actions {
    position: static !important;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: none;
    background: transparent;
  }

  /* keep focused fields in view with some breathing room */
  #bookingModal input,
  #bookingModal select,
  #bookingModal textarea {
    scroll-margin-bottom: 96px;
  }
}