/* ============================================================
   AirbnbTutorials — Shared Wizard Styles (standalone web)
   Port of the high-intent calculator wizard, page-agnostic.

   Namespace: .at-wiz-*
   Depends on: shared/css/tokens.web.css for var(--at-cta-teal) etc.

   This file is INTENTIONALLY non-!important. It's for standalone
   web pages outside Elementor. Pages that need Elementor
   override behavior should keep using the Elementor edition.

   Pattern:
       <div class="at-wiz" data-active-step="1">
         <div class="at-wiz__progress">
           <div class="at-wiz__progress-meta">
             <span class="at-wiz__progress-label" data-progress-label></span>
             <button class="at-wiz__back" data-action="back" hidden>← Back</button>
           </div>
           <div class="at-wiz__progress-track" data-progress-track
                role="progressbar" aria-valuemin="0" aria-valuemax="100">
             <div class="at-wiz__progress-fill" data-progress-fill></div>
           </div>
         </div>

         <div class="at-wiz__card">
           <div class="at-wiz__step is-active" data-step="1" data-step-name="...">
             <span class="at-wiz__eyebrow">First step</span>
             <h3 class="at-wiz__title">Question?</h3>
             <p class="at-wiz__help">Helper text.</p>
             <div class="at-wiz__control"> ...inputs... </div>
             <p class="at-wiz__error" data-step-error hidden>Error msg</p>
           </div>
           ...
         </div>

         <div class="at-wiz__footer" data-wizard-footer>
           <button class="at-wiz__next" data-action="next">Continue</button>
         </div>
       </div>
   ============================================================ */


/* ── Wizard Shell ───────────────────────────────────────── */

.at-wiz {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 22px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.06),
    0 2px 8px rgba(0,0,0,0.04);
  overflow: hidden;
}


/* ── Progress ───────────────────────────────────────────── */

.at-wiz__progress {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: rgba(30,110,109,0.025);
}

.at-wiz__progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.at-wiz__progress-label {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--at-text-kicker-light, #4a6e78);
}

.at-wiz__back {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 12.5px;
  font-weight: 540;
  color: var(--at-text-muted-light, #5a6575);
  background: transparent;
  border: none;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.at-wiz__back:hover {
  color: var(--at-text-headline-light, #1a1f2b);
  background: rgba(0,0,0,0.04);
}

.at-wiz__progress-track {
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.at-wiz__progress-fill {
  height: 100%;
  background: var(--at-cta-teal, #45C4B0);
  border-radius: 999px;
  transition: width 250ms ease-out;
  width: 0%;
}


/* ── Card / Steps ───────────────────────────────────────── */

.at-wiz__card {
  padding: clamp(22px, 4vw, 32px) clamp(20px, 4vw, 32px);
  min-height: 300px;
}
@media (max-width: 600px) {
  .at-wiz__card { min-height: 260px; }
}

.at-wiz__step { display: none; }
.at-wiz__step.is-active {
  display: block;
  animation: at-wiz-step-in 200ms ease-out;
}
@keyframes at-wiz-step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.at-wiz__eyebrow {
  display: inline-block;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--at-text-muted-light, #5a6575);
  margin-bottom: 10px;
}
.at-wiz__eyebrow--accent { color: var(--at-cta-teal, #45C4B0); }

.at-wiz__title {
  font-family: var(--at-font-heading, 'Playfair Display', Georgia, serif);
  font-weight: 800;
  font-size: clamp(1.3rem, 2vw + 0.5rem, 1.7rem);
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--at-text-headline-light, #1a1f2b);
  margin: 0 0 8px;
}

.at-wiz__help {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--at-text-muted-light, #5a6575);
  margin: 0 0 20px;
}

.at-wiz__control { margin-top: 4px; }

.at-wiz__error {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: #b54a3b;
  margin: 10px 0 0;
}

.at-wiz__trust {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 12.5px;
  font-style: italic;
  color: var(--at-text-faint-light, #7a8698);
  margin: 12px 0 0;
  text-align: center;
}


/* ── Inputs ─────────────────────────────────────────────── */

.at-wiz__input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}

.at-wiz__input-prefix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--at-text-muted-light, #5a6575);
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 14.5px;
  font-weight: 560;
}

.at-wiz__input,
.at-wiz__form-input {
  flex: 1;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 15.5px;
  font-weight: 560;
  color: var(--at-text-headline-light, #1a1f2b);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  width: 100%;
  min-width: 0;
}
.at-wiz__form-input { border-radius: 10px; }

.at-wiz__input:focus,
.at-wiz__form-input:focus {
  outline: none;
  border-color: rgba(69,196,176,0.55);
  box-shadow: 0 0 0 3px rgba(69,196,176,0.12);
}

.at-wiz__input::-webkit-outer-spin-button,
.at-wiz__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.at-wiz__input[type="number"] { -moz-appearance: textfield; }

.at-wiz__input--lg {
  font-size: 22px;
  font-weight: 600;
  padding: 16px 16px;
}
.at-wiz__input-wrap--lg .at-wiz__input-prefix {
  font-size: 18px;
  padding: 0 16px;
}
@media (max-width: 600px) {
  .at-wiz__input--lg { font-size: 20px; padding: 14px; }
}

.at-wiz__input.is-invalid,
.at-wiz__form-input.is-invalid {
  border-color: rgba(181,74,59,0.55);
  box-shadow: 0 0 0 3px rgba(181,74,59,0.10);
}

.at-wiz__form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 520px) {
  .at-wiz__form-row { grid-template-columns: 1fr; }
}

.at-wiz__field-label {
  display: block;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--at-text-muted-light, #5a6575);
  margin-bottom: 8px;
}

.at-wiz__hint {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 12px;
  font-style: italic;
  color: var(--at-text-faint-light, #7a8698);
  margin: 6px 0 0;
  line-height: 1.45;
}


/* ── Segmented selector ─────────────────────────────────── */

.at-wiz__seg {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 5px;
  background: rgba(30,110,109,0.04);
  border: 1px solid rgba(30,110,109,0.10);
  border-radius: 12px;
}
.at-wiz__seg--3 { grid-template-columns: repeat(3, 1fr); }
.at-wiz__seg--2 { grid-template-columns: repeat(2, 1fr); }

.at-wiz__seg-btn {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--at-text-muted-light, #5a6575);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.at-wiz__seg-btn:hover {
  background: rgba(255,255,255,0.65);
  color: var(--at-text-headline-light, #1a1f2b);
}
.at-wiz__seg-btn.is-active {
  background: var(--at-cta-teal, #45C4B0);
  color: var(--at-cta-dark-text, #06201D);
  box-shadow: 0 2px 8px rgba(69,196,176,0.22);
}

.at-wiz__seg--lg { padding: 6px; }
.at-wiz__seg--lg .at-wiz__seg-btn {
  padding: 14px 6px;
  font-size: 16px;
  font-weight: 700;
}


/* ── Option cards (cost / strategy / management) ───────── */

.at-wiz__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.at-wiz__option {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 16px 18px;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  width: 100%;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
}
.at-wiz__option:hover {
  border-color: rgba(69,196,176,0.40);
  background: rgba(69,196,176,0.025);
}
.at-wiz__option.is-active {
  border-color: var(--at-cta-teal, #45C4B0);
  background: rgba(69,196,176,0.06);
  box-shadow: 0 0 0 4px rgba(69,196,176,0.10);
}
.at-wiz__option-title {
  font-size: 15px;
  font-weight: 660;
  color: var(--at-text-headline-light, #1a1f2b);
}
.at-wiz__option-sub {
  font-size: 13px;
  font-weight: 440;
  line-height: 1.4;
  color: var(--at-text-muted-light, #5a6575);
}


/* ── Output rows / breakdown ────────────────────────────── */

.at-wiz__breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 22px;
}
.at-wiz__breakdown-group {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 10.5px;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--at-text-muted-light, #5a6575);
  padding: 14px 0 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 2px;
}
.at-wiz__breakdown-group:first-child { padding-top: 0; }

.at-wiz__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 14.5px;
  color: var(--at-text-body-light, #2e3442);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.at-wiz__row:last-of-type { border-bottom: none; }
.at-wiz__row dt {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 460;
  line-height: 1.38;
  margin: 0;
  overflow-wrap: break-word;
}
.at-wiz__row dd {
  flex: 0 0 auto;
  margin: 0;
  font-weight: 640;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--at-text-headline-light, #1a1f2b);
}
.at-wiz__row-hint {
  display: block;
  font-size: 11.5px;
  font-style: italic;
  color: var(--at-text-faint-light, #7a8698);
  margin-top: 3px;
  font-weight: 400;
}


/* ── Footer (Continue button) ───────────────────────────── */

.at-wiz__footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.at-wiz__next,
.at-wiz__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--at-cta-dark-text, #06201D);
  background: var(--at-cta-teal, #45C4B0);
  border: none;
  border-radius: 12px;
  padding: 15px 26px;
  cursor: pointer;
  box-shadow:
    0 4px 18px rgba(69,196,176,0.30),
    0 1px 3px rgba(0,0,0,0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.at-wiz__next:hover,
.at-wiz__submit:hover {
  background: var(--at-cta-teal-hover, #5ED6C3);
  transform: translateY(-1px);
  box-shadow:
    0 7px 22px rgba(69,196,176,0.36),
    0 2px 6px rgba(0,0,0,0.12);
}
.at-wiz__next[disabled],
.at-wiz__submit[disabled] {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}


/* ── Final / Result step helpers ────────────────────────── */

.at-wiz__final-cap {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--at-text-muted-light, #5a6575);
}

.at-wiz__final-value {
  font-family: var(--at-font-heading, 'Playfair Display', serif);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw + 0.4rem, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--at-text-headline-light, #1a1f2b);
  font-variant-numeric: tabular-nums;
}

.at-wiz__final-value-sm {
  font-family: var(--at-font-heading, 'Playfair Display', serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw + 0.4rem, 2rem);
  line-height: 1;
  letter-spacing: -0.018em;
  color: var(--at-text-headline-light, #1a1f2b);
  font-variant-numeric: tabular-nums;
}

.at-wiz__final-sub {
  font-family: var(--at-font-body, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  color: var(--at-text-muted-light, #5a6575);
  line-height: 1.45;
}


/* ── Reduced motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .at-wiz__step.is-active { animation: none; }
  .at-wiz__progress-fill { transition: none; }
  .at-wiz__next:hover,
  .at-wiz__submit:hover { transform: none; }
}
