.booking-modal {
  width: min(1000px, calc(100vw - 32px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 100px rgba(7, 17, 53, 0.42);
  overflow: auto;
}

.booking-modal::backdrop {
  background: rgba(7, 18, 51, 0.82);
  backdrop-filter: blur(7px);
}

.booking-modal [hidden] { display: none !important; }

.booking-modal__close {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #1e3a8a;
  font: 400 30px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 31, 78, 0.15);
}

.booking-modal__layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(500px, 1.18fr);
  min-height: 650px;
}

.booking-modal__intro {
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 38px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 88%, rgba(0, 207, 255, 0.22), transparent 32%),
    linear-gradient(145deg, #14245c 0%, #1e3a8a 66%, #243f99 100%);
}

.booking-modal__brand {
  display: block;
  width: min(220px, 72%);
  text-decoration: none;
}

.booking-modal__brand img {
  display: block;
  width: 100%;
  height: auto;
}

.booking-modal__eyebrow {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 12px;
  border: 1px solid rgba(0, 207, 255, 0.45);
  border-radius: 999px;
  color: #00cfff;
  background: rgba(0, 207, 255, 0.1);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.booking-modal__intro h2 {
  max-width: 340px;
  color: #fff;
  font-size: clamp(30px, 3vw, 39px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.booking-modal__intro-copy > p {
  max-width: 330px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.7;
}

.booking-modal__trust {
  display: grid;
  gap: 11px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
}

.booking-modal__trust span { color: #00cfff; margin-right: 7px; }

.booking-modal__form-panel {
  min-height: 650px;
  padding: 42px 48px 36px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.form-progress { margin: 4px 0 30px; }
.form-progress__meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; color: #718096; font-size: 12px; font-weight: 700; }
.form-progress__track { height: 6px; overflow: hidden; border-radius: 999px; background: #eaf0f7; }
.form-progress__track i { display: block; width: 18%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #00cfff, #1e7eea); transition: width 260ms ease; }

.form-save-state { display: inline-flex; align-items: center; gap: 7px; }
.form-save-state > span { width: 7px; height: 7px; border-radius: 50%; background: #aab5c4; }
.form-save-state.is-saving > span { background: #f5b731; box-shadow: 0 0 0 4px rgba(245, 183, 49, 0.13); }
.form-save-state.is-saved { color: #177a4b; }
.form-save-state.is-saved > span { background: #22b573; box-shadow: 0 0 0 4px rgba(34, 181, 115, 0.12); }
.form-save-state.is-error { color: #b42318; }
.form-save-state.is-error > span { background: #e5484d; }

.form-step { padding: 0; }
.form-step__head { margin-bottom: 22px; }
.form-step__head > span { display: block; margin-bottom: 7px; color: #118cc1; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.form-step__head h3, .calendar-ready h3 { max-width: 490px; color: #1e3a8a; font-size: clamp(25px, 3vw, 32px); font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; text-wrap: balance; }

.form-grid { display: grid; gap: 16px; }
.form-grid--two { grid-template-columns: 1fr 1fr; }
#qualification-form label { display: grid; gap: 8px; margin-bottom: 17px; color: #334155; font-size: 14px; font-weight: 700; }
.form-label-text i { color: #12bde5; font-style: normal; }
.form-field-error {
  display: block;
  margin: -2px 0 7px;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.form-field-error[hidden] { display: none; }
.form-spelling-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  align-items: start;
  gap: 7px;
  margin: -1px 0 1px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 188, 234, 0.28);
  border-radius: 10px;
  color: #334155;
  background: #effbff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}
.form-spelling-suggestion[hidden] { display: none; }
.form-spelling-suggestion button {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #087eae;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.form-spelling-suggestion__value {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.form-spelling-suggestion .form-spelling-suggestion__keep {
  grid-column: 2;
  justify-self: end;
  color: #64748b;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#qualification-form input.is-invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.1); }
#qualification-form input, #qualification-form select {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1.5px solid #dce5ef;
  border-radius: 12px;
  outline: none;
  color: #1c2736;
  background: #fff;
  font: 500 16px/1.3 Poppins, sans-serif;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
#qualification-form input::placeholder { color: #9aa8b9; }
#qualification-form input:focus, #qualification-form select:focus { border-color: #0fbcea; box-shadow: 0 0 0 4px rgba(0, 207, 255, 0.11); }

.form-choice-group { min-width: 0; margin: 0 0 17px; padding: 0; border: 0; }
.form-choice-group legend { margin-bottom: 8px; color: #334155; font-size: 14px; font-weight: 700; }
.form-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.form-choice-grid--yes-no { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#qualification-form .form-choice { position: relative; display: block; margin: 0; color: #334155; font-size: 13px; font-weight: 700; cursor: pointer; }
#qualification-form .form-choice input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}
.form-choice span {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1.5px solid #dce5ef;
  border-radius: 11px;
  background: #fff;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.form-choice:hover span { border-color: #86dff2; background: #f7fdff; transform: translateY(-1px); }
.form-choice input:focus-visible + span { border-color: #0fbcea; box-shadow: 0 0 0 4px rgba(0, 207, 255, 0.11); }
.form-choice input:checked + span { border-color: #00bfe9; color: #12377d; background: #e8faff; box-shadow: inset 0 0 0 1px #00bfe9, 0 5px 13px rgba(0, 191, 233, 0.12); }
.conditional-question { animation: conditionalReveal 180ms ease-out; }
.conditional-question[hidden] { display: none; }
@keyframes conditionalReveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }

.form-consent { margin-top: 2px; color: #748196; font-size: 12px; line-height: 1.55; }
.form-consent a { color: #1e3a8a; font-weight: 700; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.form-actions button { min-height: 54px; border-radius: 12px; font: 700 15px/1 Poppins, sans-serif; cursor: pointer; }
.form-back { width: 110px; border: 1.5px solid #dce5ef; color: #475569; background: #fff; }
.form-next { flex: 1; border: 0; color: #072f70; background: linear-gradient(135deg, #18d2f5, #00bfe9); box-shadow: 0 10px 22px rgba(0, 191, 233, 0.23); }
.form-next:hover { transform: translateY(-1px); box-shadow: 0 13px 26px rgba(0, 191, 233, 0.3); }
.form-next:disabled { cursor: wait; opacity: 0.72; }
.form-disqualified { padding: 42px 0 20px; text-align: center; }
.form-disqualified > span { display: block; margin-bottom: 8px; color: #118cc1; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.form-disqualified h3 { margin: 0 auto 14px; color: #1e3a8a; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; }
.form-disqualified p { max-width: 540px; margin: 0 auto 24px; color: #536177; font-size: 15px; line-height: 1.65; }
.form-disqualified__close { min-height: 50px; padding: 0 25px; border: 0; border-radius: 12px; color: #072f70; background: linear-gradient(135deg, #18d2f5, #00bfe9); font: 700 15px/1 Poppins, sans-serif; cursor: pointer; }

.booking-modal.is-calendar { width: min(1180px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 24px)); }
.booking-modal.is-calendar .booking-modal__layout { grid-template-columns: 300px minmax(620px, 1fr); }
.booking-modal.is-calendar .booking-modal__form-panel { padding: 25px 24px 20px; }
.booking-modal.is-calendar .form-progress { display: none; }
.calendar-ready { min-height: 700px; }
.calendar-ready__head { padding: 0 48px 15px; text-align: center; }
.calendar-ready__head > span { color: #118cc1; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.calendar-ready__head h3 { margin: 4px auto 0; font-size: 25px; }
.calendly-embed { min-height: 630px; overflow: hidden; border: 1px solid #e3e9f0; border-radius: 15px; background: #fff; }
.calendly-embed iframe { display: block; width: 100%; height: 650px; border: 0; }

body:has(.booking-modal[open]) { overflow: hidden; }

@media (max-width: 767px) {
  .booking-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .booking-modal__layout { display: block; min-height: 100%; }
  .booking-modal__intro { min-height: auto; padding: 16px 20px 14px; }
  .booking-modal__brand { width: min(155px, 54%); }
  .booking-modal__intro-copy { margin-top: 12px; }
  .booking-modal__eyebrow { margin-bottom: 0; padding: 5px 9px; font-size: 10px; }
  .booking-modal__intro h2 { display: none; }
  .booking-modal__intro-copy > p { display: none; }
  .booking-modal__trust { display: none; }
  .booking-modal__form-panel { min-height: auto; padding: 16px 20px 20px; }
  .form-progress { margin: 0 0 16px; }
  .form-progress__meta { margin-bottom: 7px; }
  .form-step__head { margin-bottom: 14px; }
  .form-step__head > span { margin-bottom: 4px; font-size: 10px; }
  .form-step__head h3 { max-width: 350px; font-size: 22px; }
  .form-grid--two { grid-template-columns: 1fr 1fr; gap: 10px; }
  #qualification-form label { gap: 5px; margin-bottom: 10px; font-size: 13px; }
  .form-spelling-suggestion { grid-template-columns: 1fr; gap: 3px; padding: 8px 10px; font-size: 11px; }
  .form-spelling-suggestion .form-spelling-suggestion__keep { grid-column: 1; justify-self: start; }
  #qualification-form input, #qualification-form select { min-height: 46px; font-size: 16px; }
  .form-choice-group { margin-bottom: 11px; }
  .form-choice-group legend { margin-bottom: 5px; font-size: 13px; }
  .form-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #qualification-form .form-choice { font-size: 12px; }
  #qualification-form .form-choice input { min-height: 1px; }
  .form-choice span { min-height: 39px; padding: 6px 7px; border-radius: 9px; }
  .form-consent { font-size: 10px; line-height: 1.4; }
  .form-actions { gap: 8px; margin-top: 14px; }
  .form-actions .form-back { width: 88px; flex: 0 0 88px; }
  .form-actions .form-next { min-width: 0; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  #qualification-form.has-fixed-actions { padding-bottom: 78px; }
  #qualification-form.has-fixed-actions .form-actions { position: fixed; z-index: 8; right: 0; bottom: 0; left: 0; margin: 0; padding: 9px 20px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid #e8eef5; background: rgba(255, 255, 255, 0.97); box-shadow: 0 -8px 24px rgba(15, 37, 68, 0.08); }
  .form-actions button { min-height: 50px; }
  .form-disqualified { padding: 28px 0 18px; }
  .booking-modal__close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .booking-modal.is-calendar { width: 100vw; height: 100dvh; max-height: none; }
  .booking-modal.is-calendar .booking-modal__intro { display: none; }
  .booking-modal.is-calendar .booking-modal__form-panel { padding: 18px 10px 0; }
  .calendar-ready { min-height: calc(100dvh - 18px); }
  .calendar-ready__head { padding: 0 48px 12px; }
  .calendar-ready__head h3 { font-size: 22px; }
  .calendly-embed { min-height: calc(100dvh - 80px); border-radius: 13px 13px 0 0; }
  .calendly-embed iframe { height: calc(100dvh - 80px); }
}

@media (max-width: 390px) {
  .form-grid--two { grid-template-columns: 1fr; gap: 0; }
  .booking-modal__intro { padding-bottom: 12px; }
  .booking-modal__intro-copy { margin-top: 10px; }
  .booking-modal__form-panel { padding-top: 14px; }
}
