/* ── Sentinel (invisible, in normal flow at hero boundary) ── */
.cg-wizard__sentinel {
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ════════════════════════════════════════════
   WIZARD — shared variables
   ════════════════════════════════════════════ */
.cg-wizard {
  --cg-wiz-accent:     var(--accent, #22c55e);
  --cg-wiz-accent-dk:  var(--accent-dark, #16a34a);
  --cg-wiz-ink:        #0f172a;
  --cg-wiz-muted:      #64748b;
  --cg-wiz-border:     #e2e8f0;
  --cg-wiz-bg:         #fff;
  --cg-wiz-radius:     20px;
  --cg-wiz-transition: 160ms ease;

  /* ── Hero state (default, sentinel visible) ── */
  position: absolute;
  right: 5vw;
  top: 200px;
  z-index: 70;
  width: min(40vw, calc(100vw - 56px));
  opacity: 0.8;
  transition: opacity var(--cg-wiz-transition);
}

.cg-wizard:hover,
.cg-wizard:focus-within {
  opacity: 1;
}

.cg-wizard--inline {
  position: relative;
  top: auto;
  right: auto;
  width: min(560px, 100%);
  /* height: 538px; */
  margin-left: 0px;
  opacity: 1;
  transition: none;
  display: block;
}

.cg-wizard--inline .cg-wizard__sheet {
  width: 100%;
}

.cg-wizard--inline .cg-wizard__card {
  height: auto;
  max-height: none;
  overflow: visible;
  width: 100%;
}

.cg-wizard--inline .cg-wizard__close {
  display: none !important;
}

/* Keep hero note directly under inline wizard without large vertical gap */
.hero .content:has(.cg-wizard--inline) + .hero-cta-note {
  margin-top: 10px;
}

/* Compact inline wizard block inside hero flow */
.hero .content:has(.cg-wizard--inline) {
  margin: 0;
}

.cg-wizard--inline.cg-wizard--booking .cg-wizard__card {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
}

.cg-wizard--inline.cg-wizard--assessment-booking .cg-wizard__card {
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
}

.cg-wizard--assessment-booking .cg-wizard__slots {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ── Sticky state (sentinel scrolled past) ── */
.cg-wizard.is-sticky {
  position: fixed;
  top: 110px;
  right: 16px;
  width: min(296px, calc(100vw - 24px));
}

/* ── Fly animations ── */
@keyframes cg-wiz-fly-out {
  from { transform: translateX(0);              opacity: 1; }
  to   { transform: translateX(calc(100% + 48px)); opacity: 0; }
}
@keyframes cg-wiz-fly-in {
  from { transform: translateX(calc(100% + 48px)); opacity: 0; }
  to   { transform: translateX(0);              opacity: 1; }
}

.cg-wizard.is-flying-out {
  animation: cg-wiz-fly-out 260ms cubic-bezier(.55, 0, 1, .45) forwards;
  pointer-events: none;
}
.cg-wizard.is-flying-in {
  animation: cg-wiz-fly-in 360ms cubic-bezier(.22, 1, .36, 1) forwards;
}

/* ── Mobile trigger bar (hidden on desktop) ── */
.cg-wizard__mobile-trigger {
  display: none;
}

/* ════════════════════════════════════════════
   CARD
   ════════════════════════════════════════════ */
.cg-wizard__card {
  background: white;
  border-radius: var(--cg-wiz-radius);
  border: 1px solid rgba(15, 23, 42, .09);
  padding: 20px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  container-type: inline-size;

  /* Hero state: prominent shadow + accent top bar */
  box-shadow: 0 24px 64px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .08);
  border-top: 4px solid var(--cg-wiz-accent);
}

/* Card in sticky state: compact */
.cg-wizard.is-sticky .cg-wizard__card {
  padding: 16px;
  border-top: none;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .14), 0 2px 8px rgba(15, 23, 42, .06);
}

/* ── Header ── */
.cg-wizard__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.cg-wizard__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 3px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cg-wiz-accent-dk);
}

.cg-wizard__eyebrow::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cg-wiz-accent);
}

.cg-wizard__subtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--cg-wiz-ink);
  line-height: 1.3;
  letter-spacing: -.01em;
}

.cg-wizard.is-sticky .cg-wizard__subtitle {
  font-size: 14px;
}

/* ── Close button (hidden on desktop hero/sticky, shown on mobile) ── */
.cg-wizard__close {
  display: none;
  flex-shrink: 0;
  border: 0;
  background: rgba(15, 23, 42, .06);
  color: var(--cg-wiz-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  line-height: 0;
  transition: background var(--cg-wiz-transition), color var(--cg-wiz-transition);
}

.cg-wizard__close:hover {
  background: rgba(15, 23, 42, .12);
  color: var(--cg-wiz-ink);
}

.cg-wizard__close svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* ════════════════════════════════════════════
   STEPS
   ════════════════════════════════════════════ */
.cg-wizard__step {
  transition: opacity 200ms ease-out, transform 200ms ease-out;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.cg-wizard__step[data-cg-wizard-step="1"] {
  margin-top: 20px !important;
}

.cg-wizard__step--hidden {
  opacity: 0;
  transform: translateY(-5px);
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

/* Step question / label */
.cg-wizard__question,
.cg-wizard__label {
  margin: 0 0 7px !important;
  font-size: 14px;
  font-weight: 800;
  color: var(--cg-wiz-ink);
  line-height: 1.3;
}

.cg-wizard.is-sticky .cg-wizard__question,
.cg-wizard.is-sticky .cg-wizard__label {
  font-size: 13px;
}

/* ── Nav / Back button ── */
.cg-wizard__nav {
  margin-top: 8px;
}

.cg-wizard__nav--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cg-wizard__back {
  border: 0;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
  cursor: pointer;
}

.cg-wizard__back:hover {
  color: var(--cg-wiz-ink);
}

.cg-wizard__next {
  border: 0;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  background: var(--cg-wiz-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cg-wizard__next:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.cg-wizard__progress {
  margin: 0 0 6px;
  color: var(--cg-wiz-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ════════════════════════════════════════════
   OPTIONS + SLOTS
   ════════════════════════════════════════════ */
.cg-wizard__options,
.cg-wizard__slots {
  display: grid;
  gap: 8px;
}

.cg-wizard__options--with-icons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cg-wizard__options--diagnostic {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cg-wizard__slots {
  max-height: none;
  overflow: visible;
}

.cg-wizard__option,
.cg-wizard__slot {
  position: relative;
  width: 100%;
  border: 1.5px solid #ddd;
  background: #efefef;
  color: var(--cg-wiz-ink);
  border-radius: 12px;
  padding: 11px 13px;
  text-align: left;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.35;
  transition:
    border-color var(--cg-wiz-transition),
    background   var(--cg-wiz-transition),
    box-shadow   var(--cg-wiz-transition),
    transform    80ms ease;
}

.cg-wizard__option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cg-wizard__option-icon {
  display: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.cg-wizard__option-text {
  display: block;
}

@container (min-width: 280px) {
  .cg-wizard__options--with-icons .cg-wizard__option {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    min-height: 74px;
  }

  .cg-wizard__options--with-icons .cg-wizard__option-icon {
    display: block;
  }
}

@container (max-width: 339px) {
  .cg-wizard__options--with-icons,
  .cg-wizard__options--diagnostic {
    grid-template-columns: 1fr;
  }
}

.cg-wizard.is-sticky .cg-wizard__option,
.cg-wizard.is-sticky .cg-wizard__slot {
  padding: 9px 11px;
  font-size: 13px;
}

.cg-wizard__option:hover,
.cg-wizard__slot:hover {
  border-color: color-mix(in srgb, var(--cg-wiz-accent) 55%, transparent);
  background: color-mix(in srgb, var(--cg-wiz-accent) 5%, white);
  transform: translateY(-1px);
}

.cg-wizard__option:active,
.cg-wizard__slot:active {
  transform: translateY(0);
}

.cg-wizard__option.is-active,
.cg-wizard__slot.is-active {
  border-color: var(--cg-wiz-accent);
  background: color-mix(in srgb, var(--cg-wiz-accent) 8%, white);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cg-wiz-accent) 18%, transparent);
  transform: translateY(0);
}

.cg-wizard__option.is-confirming,
.cg-wizard__slot.is-confirming {
  border-color: #22c55e;
  background: color-mix(in srgb, #22c55e 12%, white);
  box-shadow:
    0 0 0 3px rgba(34, 197, 94, .18),
    0 12px 24px rgba(34, 197, 94, .12);
  color: var(--cg-wiz-ink);
}

.cg-wizard__option.is-confirming::after,
.cg-wizard__slot.is-confirming::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: #22c55e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3 3L15 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
  box-shadow: 0 4px 10px rgba(34, 197, 94, .28);
  pointer-events: none;
}

.cg-wizard__slot small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--cg-wiz-muted);
}

/* ── Chosen slot badge ── */
.cg-wizard__chosen-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cg-wiz-accent) 8%, white);
  border: 1px solid color-mix(in srgb, var(--cg-wiz-accent) 28%, transparent);
  color: var(--cg-wiz-ink);
  font-size: 12px;
  font-weight: 600;
}

.cg-wizard__chosen-slot::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ════════════════════════════════════════════
   FORM
   ════════════════════════════════════════════ */
.cg-wizard__step input {
  width: 100%;
  border: 1.5px solid var(--cg-wiz-border);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--cg-wiz-ink);
  background: var(--cg-wiz-bg);
  min-height: 40px;
  transition: border-color var(--cg-wiz-transition), box-shadow var(--cg-wiz-transition);
}

.cg-wizard__step textarea {
  width: 100%;
  border: 1.5px solid var(--cg-wiz-border);
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--cg-wiz-ink);
  background: var(--cg-wiz-bg);
  resize: vertical;
}

.cg-wizard__step input::placeholder {
  color: #94a3b8;
}

.cg-wizard__step textarea::placeholder {
  color: #94a3b8;
}

.cg-wizard__step input:focus {
  outline: none;
  border-color: var(--cg-wiz-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cg-wiz-accent) 20%, transparent);
}

.cg-wizard__step input.is-invalid,
.cg-wizard__step textarea.is-invalid {
  border-color: #dc2626;
  background: #fff7f7;
}

.cg-wizard__step input.is-invalid:focus,
.cg-wizard__step textarea.is-invalid:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .16);
}

.cg-wizard__field-error {
  margin: -4px 0 8px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-align: left;
}

.cg-wizard__field-error[hidden] {
  display: none;
}

.cg-wizard__step button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 10px;
  min-height: 42px;
  background: var(--cg-wiz-accent);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: -.01em;
  transition: background var(--cg-wiz-transition), transform 80ms ease;
}

.cg-wizard__consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  column-gap: 10px;
  font-size: 12px;
  color: #334155;
  margin: 2px 0 10px;
  line-height: 1.4;
  cursor: pointer;
}

.cg-wizard__consent input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--cg-wiz-accent);
  cursor: pointer;
}

.cg-wizard__consent span {
  display: block;
}

.cg-wizard__consent a {
  color: var(--cg-wiz-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cg-wizard__consent.is-invalid {
  color: #991b1b;
}

.cg-wizard__consent.is-invalid input[type="checkbox"] {
  outline: 2px solid rgba(220, 38, 38, .35);
  outline-offset: 2px;
}

.cg-wizard__trust {
  margin: 8px 0 0;
  color: #334155;
  font-size: 12px;
  line-height: 1.4;
}

.cg-wizard__step button[type="submit"]:hover:not(:disabled) {
  background: var(--cg-wiz-accent-dk);
  transform: translateY(-1px);
}

.cg-wizard__step button[type="submit"]:active {
  transform: translateY(0);
}

.cg-wizard__step button[type="submit"]:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* ════════════════════════════════════════════
   FEEDBACK STATES
   ════════════════════════════════════════════ */
.cg-wizard__success {
  margin: 0;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.cg-wizard__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cg-wiz-muted);
  padding: 4px 0;
}

.cg-wizard__loading::before {
  content: "";
  flex-shrink: 0;
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  border-top-color: var(--cg-wiz-accent);
  animation: cg-wiz-spin .7s linear infinite;
}

@keyframes cg-wiz-spin { to { transform: rotate(360deg); } }

.cg-wizard__error {
  font-size: 12px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 8px 0 0;
  line-height: 1.4;
  text-align: left;
}

/* ════════════════════════════════════════════
   MOBILE (≤ 980 px)
   ════════════════════════════════════════════ */
@media (max-width: 980px) {
  .cg-wizard {
    right: 0;
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    transform: none;
    z-index: 80;
    height: 100dvh;
    /* disable fly animations on mobile */
    animation: none !important;
  }

  /* Close button visible on mobile */
  .cg-wizard__close {
    display: flex;
  }

  .cg-wizard--inline {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    margin-top: 14px;
    display: block;
  }

  .cg-wizard--inline .cg-wizard__mobile-trigger {
    display: none;
  }

  .cg-wizard--inline .cg-wizard__sheet {
    position: static;
    transform: none;
    padding: 0;
    pointer-events: auto;
  }

  .cg-wizard--inline .cg-wizard__card {
    max-height: none;
    overflow: visible;
    border-radius: 18px;
  }

  /* Sticky trigger bar */
  .cg-wizard__mobile-trigger {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--cg-wiz-border);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, .10);
    cursor: pointer;
  }

  .cg-wizard__mobile-trigger span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    max-width: 340px;
    background: var(--cg-wiz-accent);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -.01em;
    border-radius: 999px;
    padding: 11px 20px;
    transition: background var(--cg-wiz-transition);
    pointer-events: none;
  }

  .cg-wizard__mobile-trigger:hover span {
    background: var(--cg-wiz-accent-dk);
  }

  /* Sheet slides up */
  .cg-wizard__sheet {
    position: fixed;
    inset: auto 0 0 0;
    padding: 0 10px 10px;
    /* height: calc(100dvh - 72px); */
    transform: translateY(100%);
    transition: transform 220ms ease-out;
    pointer-events: none;
  }

  .cg-wizard.is-open .cg-wizard__sheet {
    transform: translateY(0);
    pointer-events: auto;
  }

  .cg-wizard__card {
    height: 100%;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 18px 18px 14px 14px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: none;
  }

  .cg-wizard__header {
    position: sticky;
    top: 0;
    background: var(--cg-wiz-bg);
    padding-top: 2px;
    padding-bottom: 2px;
    z-index: 1;
  }

  .cg-wizard__hederwrapper{
    text-align: left;
  }

  .cg-wizard__consent span{
    text-align: left;
  }
}
