/* Mother water heater / drain estimator — styling refresh
   Functionality untouched: every class + state hook the JS relies on is preserved.
   Improvements: fixed mobile button blob, fixed form label/input gaps, real
   checkbox vs radio indicators, removed dead vertical space, richer brand surface,
   refined options, inputs, buttons, progress, results and motion. */

#wh-estimator {
  --quiz-navy: #15154a;
  --quiz-navy-deep: #0c0c33;
  --quiz-bg: #15154a;
  --quiz-card: #ffffff;
  --quiz-text: #0a0a3d;
  --quiz-muted: #5f627f;
  --quiz-placeholder: #a0a3ba;
  --quiz-surface: #f6f7fb;
  --quiz-surface-strong: #eceef5;
  --quiz-border: #e2e4ee;
  --quiz-border-strong: #c7cadb;
  --quiz-accent: #ef2b6b;
  --quiz-accent-strong: #d31a59;
  --quiz-accent-soft: #fbb6cd;
  --quiz-accent-tint: #fff4f8;
  --quiz-accent-grad: linear-gradient(180deg, #f53d77 0%, #ef2b6b 55%, #df1f60 100%);
  --quiz-focus: rgba(239, 43, 107, 0.22);
  --quiz-ring: rgba(239, 43, 107, 0.5);

  --quiz-radius: 18px;
  --quiz-radius-md: 13px;
  --quiz-radius-sm: 11px;
  --quiz-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 60px -18px rgba(6, 6, 48, 0.55),
    0 8px 22px -12px rgba(6, 6, 48, 0.4);

  --quiz-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --quiz-display-font: var(--quiz-font);

  --quiz-motion-fast: 140ms;
  --quiz-motion-medium: 240ms;
  --quiz-motion-slow: 360ms;
  --quiz-motion-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --quiz-card-width: 600px;
  --quiz-inner-width: 480px;

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  padding: clamp(20px, 5svh, 56px) 18px clamp(24px, 5svh, 56px);
  overflow: visible;
  color: var(--quiz-text);
  background: var(--quiz-navy-deep);
  font-family: var(--quiz-font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#wh-estimator,
#wh-estimator * {
  box-sizing: border-box;
}

#wh-estimator button,
#wh-estimator input,
#wh-estimator textarea,
#wh-estimator select {
  font-family: inherit;
}

/* Background photo + brand wash so the surface reads intentional even if the
   image is slow or unavailable. */
#wh-estimator::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    url("https://cdn.prod.website-files.com/678144dfb4c536263e714199/699885f29abad94e6c908479_123.webp") center / cover no-repeat,
    var(--quiz-navy);
}

#wh-estimator::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(239, 43, 107, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(12, 12, 51, 0.55) 0%, rgba(12, 12, 51, 0.78) 100%);
}

/* ---------------- Card ---------------- */
#wh-estimator .quiz_form-component,
#wh-estimator .card {
  position: relative;
  width: min(100%, var(--quiz-card-width));
  overflow: hidden;
  border-radius: var(--quiz-radius);
  background: var(--quiz-card);
  box-shadow: var(--quiz-shadow);
}

/* The card grows to its natural content height and lets the host page scroll.
   No viewport cap and no internal scroll region: inside an embed those cause
   clipped/unreachable options and content-width shifts between steps. */
#wh-estimator .quiz_form-component {
  display: flex;
  flex-direction: column;
  height: auto;
}

#wh-estimator .quiz_main-content,
#wh-estimator .card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(24px, 3.4vw, 34px);
}

#wh-estimator .quiz_main-content {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}

/* ---------------- Headings ---------------- */
#wh-estimator .stepHeader h2,
#wh-estimator .quiz_question-title {
  margin: 0;
  color: var(--quiz-text);
  font-family: var(--quiz-display-font);
  font-size: clamp(22px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.14;
  text-wrap: balance;
}

#wh-estimator .stepSub,
#wh-estimator .quiz_question-subtitle {
  margin: 0;
  color: var(--quiz-muted);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

#wh-estimator .quiz_question-image-wrapper {
  width: 100%;
  height: clamp(140px, 22svh, 190px);
  margin-top: 4px;
  overflow: hidden;
  border-radius: var(--quiz-radius-md);
  background: var(--quiz-surface-strong);
}

#wh-estimator .quiz_question-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------- Progress ---------------- */
#wh-estimator .quiz_progress-wrap,
#wh-estimator .progressWrap {
  display: grid;
  gap: 9px;
  width: 100%;
  min-width: 0;
  align-self: stretch;
}

#wh-estimator .quiz_form-progress,
#wh-estimator .progressBar {
  position: relative;
  display: block;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--quiz-surface-strong);
  contain: layout paint;
}

#wh-estimator .quiz_form-progress-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--quiz-accent-grad);
  box-shadow: 0 0 12px -2px var(--quiz-ring);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--quiz-motion-slow) var(--quiz-motion-ease);
  will-change: transform;
}

#wh-estimator .progressFill {
  height: 100%;
  border-radius: inherit;
  background: var(--quiz-accent-grad);
  transition: width var(--quiz-motion-slow) var(--quiz-motion-ease);
  will-change: width;
}

#wh-estimator .quiz_progress-meta,
#wh-estimator .progressMeta {
  color: var(--quiz-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ---------------- Step body layout ---------------- */
#wh-estimator .quiz_changable-content,
#wh-estimator .quiz_step-content,
#wh-estimator .quiz-question-content,
#wh-estimator .card > #step-content {
  display: flex;
  flex-direction: column;
}

#wh-estimator .quiz_changable-content {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  gap: 18px;
}

#wh-estimator .quiz-question-content {
  flex: 0 0 auto;
  gap: 9px;
}

#wh-estimator .quiz_step-content {
  flex: 0 0 auto;
  gap: 14px;
  overflow: visible;
}

/* Selection steps flow at their natural height; the page scrolls if a step is
   taller than the viewport, so every option stays reachable. */
#wh-estimator .quiz_step-content--single_select,
#wh-estimator .quiz_step-content--multi_select {
  overflow: visible;
}

/* ---------------- Step + item entrance motion ---------------- */
#wh-estimator .quiz_changable-content.is-entering {
  animation: wh-step-enter var(--quiz-motion-medium) var(--quiz-motion-ease) both;
}

#wh-estimator .quiz_changable-content.is-entering .quiz-question-content,
#wh-estimator .quiz_changable-content.is-entering .quiz_step-content,
#wh-estimator .quiz_changable-content.is-entering .quiz_price-preview,
#wh-estimator .quiz_changable-content.is-entering .quiz_nav-actions {
  animation: wh-item-enter var(--quiz-motion-medium) var(--quiz-motion-ease) both;
}

#wh-estimator .quiz_changable-content.is-entering .quiz_step-content {
  animation-delay: 50ms;
}

#wh-estimator .quiz_changable-content.is-entering .quiz_price-preview {
  animation-delay: 80ms;
}

#wh-estimator .quiz_changable-content.is-entering .quiz_nav-actions {
  animation-delay: 105ms;
}

#wh-estimator .quiz_heading-tooltip-icon-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ---------------- Legacy text utilities (kept) ---------------- */
#wh-estimator .text-size-20px {
  font-size: 20px;
  line-height: 1.18;
}

#wh-estimator .text-size-16px {
  font-size: 16px;
}

#wh-estimator .text-size-14px {
  color: var(--quiz-muted);
  font-size: 14px;
  line-height: 1.4;
}

#wh-estimator .text-weight-bold {
  font-weight: 800;
}

#wh-estimator .text-weight-medium {
  font-weight: 500;
}

#wh-estimator .text-color-secondary {
  color: var(--quiz-text);
}

#wh-estimator .opacity-50 {
  opacity: 1;
}

/* ---------------- Options ---------------- */
#wh-estimator .quiz-options-wrapper,
#wh-estimator .quiz-options-wrapper.has-images,
#wh-estimator .choicesList,
#wh-estimator .choicesGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: none;
  overflow: visible;
  align-content: start;
}

#wh-estimator .quiz_step-content::-webkit-scrollbar,
#wh-estimator .quiz-options-wrapper::-webkit-scrollbar,
#wh-estimator .choicesList::-webkit-scrollbar,
#wh-estimator .choicesGrid::-webkit-scrollbar {
  width: 10px;
}

#wh-estimator .quiz_step-content::-webkit-scrollbar-track,
#wh-estimator .quiz-options-wrapper::-webkit-scrollbar-track,
#wh-estimator .choicesList::-webkit-scrollbar-track,
#wh-estimator .choicesGrid::-webkit-scrollbar-track {
  border-radius: 20px;
  background: transparent;
}

#wh-estimator .quiz_step-content::-webkit-scrollbar-thumb,
#wh-estimator .quiz-options-wrapper::-webkit-scrollbar-thumb,
#wh-estimator .choicesList::-webkit-scrollbar-thumb,
#wh-estimator .choicesGrid::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 20px;
  background: var(--quiz-border-strong);
  background-clip: padding-box;
}

#wh-estimator .quiz-option,
#wh-estimator .choice {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1.5px solid var(--quiz-border);
  border-radius: var(--quiz-radius-md);
  background: var(--quiz-card);
  cursor: pointer;
  transition:
    border-color var(--quiz-motion-fast) ease,
    background var(--quiz-motion-fast) ease;
}

#wh-estimator .quiz-option:hover,
#wh-estimator .choice:hover {
  border-color: var(--quiz-border-strong);
  background: var(--quiz-surface);
}

#wh-estimator .quiz-option.is-input-active,
#wh-estimator .choice.active {
  border-color: var(--quiz-accent);
  background: var(--quiz-accent-tint);
  box-shadow: inset 0 0 0 1px var(--quiz-accent);
  animation: wh-choice-select var(--quiz-motion-medium) var(--quiz-motion-ease) both;
}

#wh-estimator .quiz-option:focus-visible,
#wh-estimator .choice:focus-visible,
#wh-estimator .quiz_next-button:focus-visible,
#wh-estimator .quiz_back-button:focus-visible,
#wh-estimator .quiz_start-over-button:focus-visible,
#wh-estimator .btn:focus-visible,
#wh-estimator .tip:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--quiz-focus);
}

#wh-estimator .wh_choice-radio,
#wh-estimator .quiz-radio,
#wh-estimator .quiz-checkbox,
#wh-estimator .choiceMain {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  width: 100%;
  padding: 13px 16px;
  cursor: pointer;
}

#wh-estimator .wh_choice-native-radio,
#wh-estimator .quiz_native-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* Default indicator = radio (circle). */
#wh-estimator .wh_choice-radio-button,
#wh-estimator .quiz_radio-button,
#wh-estimator .quiz_checkbox-button {
  position: relative;
  width: 22px;
  height: 22px;
  flex: initial;
  margin: 0;
  top: auto;
  left: auto;
  border: 2px solid var(--quiz-border-strong);
  border-radius: 999px;
  background: #ffffff;
  transition: border-color var(--quiz-motion-fast) ease, background var(--quiz-motion-fast) ease, box-shadow var(--quiz-motion-fast) ease;
}

/* Selected radio: filled dot. */
#wh-estimator .quiz-option.is-input-active .wh_choice-radio-button,
#wh-estimator .quiz-option.is-input-active .quiz_radio-button,
#wh-estimator .quiz-option.is-input-active .quiz_checkbox-button,
#wh-estimator .choice.active .wh_choice-radio-button {
  border-color: var(--quiz-accent);
  background: #ffffff;
}

#wh-estimator .quiz-option.is-input-active .wh_choice-radio-button::after,
#wh-estimator .quiz-option.is-input-active .quiz_radio-button::after,
#wh-estimator .quiz-option.is-input-active .quiz_checkbox-button::after,
#wh-estimator .choice.active .wh_choice-radio-button::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--quiz-accent);
  animation: wh-choice-dot-radio var(--quiz-motion-fast) var(--quiz-motion-ease) both;
}

#wh-estimator .wh_choice-native-radio:focus-visible + .wh_choice-radio-button,
#wh-estimator .quiz_native-radio:focus-visible + .quiz_radio-button {
  box-shadow: 0 0 0 4px var(--quiz-focus);
}

#wh-estimator .wh_choice-content,
#wh-estimator .quiz_choose-option-content,
#wh-estimator .choiceTop {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#wh-estimator .choiceLabel,
#wh-estimator .quiz_choose-option-content > :first-child,
#wh-estimator .quiz_option-label {
  color: var(--quiz-text);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

#wh-estimator .quiz_choose-option-content > :nth-child(2),
#wh-estimator .quiz_option-description {
  color: var(--quiz-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

#wh-estimator .quiz_option-img-wrapper,
#wh-estimator .oimg {
  width: 76px;
  height: 52px;
  overflow: hidden;
  border-radius: 9px;
  background: var(--quiz-surface-strong);
}

#wh-estimator .quiz_option-img,
#wh-estimator .oimg {
  display: block;
  object-fit: cover;
}

#wh-estimator .quiz_option-img {
  width: 100%;
  height: 100%;
}

/* ---------------- Form fields ---------------- */
#wh-estimator .form-field-wrapper,
#wh-estimator .field {
  display: grid;
  gap: 7px;
  align-content: start; /* stops label/input rows from stretching apart */
}

#wh-estimator .form-field-wrapper {
  min-height: 0;
}

/* Separate one field group from the next without touching the JS DOM order
   (label, input, error are flat siblings). */
#wh-estimator .form-field-wrapper > .quiz_text-field:not(:first-child),
#wh-estimator .field > .fieldLabel:not(:first-child) {
  margin-top: 16px;
}

#wh-estimator .quiz_text-field,
#wh-estimator .fieldLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--quiz-text);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

#wh-estimator .quiz_text-input-field,
#wh-estimator .field input,
#wh-estimator .field select,
#wh-estimator .field textarea {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--quiz-border);
  border-radius: var(--quiz-radius-sm);
  background: var(--quiz-surface);
  color: var(--quiz-text);
  font: inherit;
  font-size: 15px;
  outline: none;
  padding: 13px 15px;
  transition: border-color var(--quiz-motion-fast) ease, background var(--quiz-motion-fast) ease, box-shadow var(--quiz-motion-fast) ease;
}

#wh-estimator .quiz_text-input-field:hover,
#wh-estimator .field input:hover,
#wh-estimator .field select:hover,
#wh-estimator .field textarea:hover {
  border-color: var(--quiz-border-strong);
}

#wh-estimator .quiz_text-input-field::placeholder,
#wh-estimator .field input::placeholder,
#wh-estimator .field textarea::placeholder {
  color: var(--quiz-placeholder);
  opacity: 1;
}

#wh-estimator .quiz_text-input-field:focus,
#wh-estimator .field input:focus,
#wh-estimator .field select:focus,
#wh-estimator .field textarea:focus {
  border-color: var(--quiz-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--quiz-focus);
}

#wh-estimator .fieldErr {
  color: var(--quiz-accent-strong);
  font-size: 12px;
  font-weight: 600;
}

/* ---------------- Nav + buttons ---------------- */
#wh-estimator .quiz_nav-actions,
#wh-estimator .nav {
  position: static !important;
  inset: auto !important;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  width: 100%;
  flex: 0 0 auto;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--quiz-border);
  background: var(--quiz-card);
}

#wh-estimator .quiz_next-button,
#wh-estimator .btn {
  position: static !important;
  inset: auto !important;
  appearance: none;
  min-height: 52px;
  flex: 0 0 auto;
  min-width: 200px;
  margin-left: auto;
  border: 0;
  border-radius: 999px;
  background: var(--quiz-accent);
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  padding: 15px 26px;
  transition: background var(--quiz-motion-fast) ease,
    opacity var(--quiz-motion-fast) ease;
}

#wh-estimator .quiz_next-button:hover,
#wh-estimator .btn:hover {
  background: var(--quiz-accent-strong);
}

#wh-estimator .quiz_next-button:active,
#wh-estimator .btn:active {
  background: var(--quiz-accent-strong);
}

#wh-estimator .quiz_next-button:disabled,
#wh-estimator .btn:disabled {
  background: var(--quiz-surface-strong);
  color: var(--quiz-placeholder);
  cursor: not-allowed;
}

#wh-estimator .quiz_back-button,
#wh-estimator .btn.secondary {
  position: static !important;
  inset: auto !important;
  appearance: none;
  min-height: 52px;
  flex: 0 0 auto;
  border: 1.5px solid var(--quiz-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--quiz-text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 24px;
  transition:
    border-color var(--quiz-motion-fast) ease,
    background var(--quiz-motion-fast) ease,
    color var(--quiz-motion-fast) ease;
}

#wh-estimator .quiz_back-button:hover,
#wh-estimator .btn.secondary:hover {
  border-color: var(--quiz-border-strong);
  background: var(--quiz-surface);
}

#wh-estimator .quiz_back-button:active,
#wh-estimator .btn.secondary:active {
  background: var(--quiz-surface-strong);
}

#wh-estimator .quiz_start-over-button {
  position: static !important;
  inset: auto !important;
  appearance: none;
  min-height: 52px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--quiz-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 14px;
  transition:
    border-color var(--quiz-motion-fast) ease,
    background var(--quiz-motion-fast) ease,
    color var(--quiz-motion-fast) ease;
}

#wh-estimator .quiz_start-over-button:hover {
  background: var(--quiz-surface);
  color: var(--quiz-text);
}

/* ---------------- Price preview ---------------- */
#wh-estimator .quiz_price-preview,
#wh-estimator .preview {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--quiz-border);
  border-radius: var(--quiz-radius-md);
  background: var(--quiz-surface);
  padding: 15px 17px;
}

#wh-estimator .quiz_price-preview-top,
#wh-estimator .previewTop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiz-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#wh-estimator .quiz_price-preview-value,
#wh-estimator .previewPrice {
  color: var(--quiz-text);
  font-family: var(--quiz-display-font);
  font-size: clamp(30px, 7vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

#wh-estimator .quiz_price-preview-sub,
#wh-estimator .previewSub {
  color: var(--quiz-muted);
  font-size: 13px;
}

/* ---------------- Notes / content blocks ---------------- */
#wh-estimator .note,
#wh-estimator .contentBlock {
  border: 1px solid var(--quiz-border);
  border-radius: var(--quiz-radius-md);
  background: var(--quiz-surface);
  color: var(--quiz-muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 15px;
}

/* ---------------- Results ---------------- */
#wh-estimator .quiz_result-content {
  display: grid;
  gap: 16px;
}

#wh-estimator .quiz_result-message {
  color: var(--quiz-text);
  font-size: 16px;
  line-height: 1.55;
}

#wh-estimator .quiz_result-scores {
  white-space: pre-line;
}

#wh-estimator .quiz_result-availability {
  display: grid;
  gap: 8px;
}

#wh-estimator .quiz_result-availability-message {
  color: var(--quiz-text);
  font-weight: 700;
}

#wh-estimator .quiz_result-availability-advice {
  color: var(--quiz-muted);
}

#wh-estimator .submitMessage {
  display: none;
}

#wh-estimator .submitMessage.success {
  border-color: rgba(31, 122, 80, 0.26);
  background: rgba(31, 122, 80, 0.08);
  color: #1f7a50;
}

#wh-estimator .submitMessage.error {
  border-color: rgba(211, 26, 89, 0.26);
  background: rgba(211, 26, 89, 0.08);
  color: var(--quiz-accent-strong);
}

/* ---------------- Loading ---------------- */
#wh-estimator .loading {
  display: grid;
  flex: 1 1 auto;
  min-height: 220px;
  place-items: center;
}

#wh-estimator .loadingInner {
  display: grid;
  justify-items: center;
  gap: 15px;
  text-align: center;
}

#wh-estimator .spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(10, 10, 61, 0.12);
  border-top-color: var(--quiz-accent);
  border-radius: 999px;
  animation: wh-spin 850ms linear infinite;
}

#wh-estimator .loadingTitle {
  color: var(--quiz-text);
  font-family: var(--quiz-display-font);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#wh-estimator .loadingSub {
  color: var(--quiz-muted);
  font-size: 14px;
  line-height: 1.5;
}

#wh-estimator .loadBar {
  width: min(320px, 70vw);
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--quiz-surface-strong);
}

#wh-estimator .loadFill {
  height: 100%;
  border-radius: inherit;
  background: var(--quiz-accent-grad);
}

/* ---------------- Tooltip ---------------- */
#wh-estimator .tipWrap {
  position: relative;
  display: inline-flex;
}

#wh-estimator .tip {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--quiz-border-strong);
  border-radius: 999px;
  color: var(--quiz-muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color var(--quiz-motion-fast) ease, color var(--quiz-motion-fast) ease;
}

#wh-estimator .tip:hover {
  border-color: var(--quiz-accent);
  color: var(--quiz-accent);
}

#wh-estimator .tipBubble {
  position: absolute;
  z-index: 20;
  top: 26px;
  right: 0;
  width: min(280px, 72vw);
  border: 1px solid var(--quiz-border);
  border-radius: var(--quiz-radius-sm);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(6, 6, 48, 0.2);
  color: var(--quiz-text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
  padding: 12px 13px;
}

/* ---------------- Keyframes ---------------- */
@keyframes wh-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wh-step-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wh-item-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wh-choice-select {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.012);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes wh-choice-dot {
  from {
    opacity: 0;
    transform: scale(0.55) rotate(45deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
}

@keyframes wh-choice-dot-radio {
  from {
    opacity: 0;
    transform: scale(0.55);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------------- Mobile ---------------- */
@media (max-width: 700px) {
  #wh-estimator {
    min-height: auto;
    align-items: flex-start;
    padding: 16px 12px 28px;
    overflow: visible;
  }

  #wh-estimator .quiz_form-component,
  #wh-estimator .card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  #wh-estimator .quiz_main-content,
  #wh-estimator .card {
    gap: 18px;
    padding: 22px 20px 24px;
  }

  #wh-estimator .quiz_main-content {
    min-height: 0;
  }

  #wh-estimator .quiz_changable-content {
    min-height: 0;
  }

  #wh-estimator .quiz_step-content,
  #wh-estimator .form-field-wrapper {
    overflow: visible;
  }

  #wh-estimator .stepHeader h2,
  #wh-estimator .quiz_question-title {
    font-size: 23px;
  }

  #wh-estimator .quiz_question-image-wrapper {
    height: clamp(144px, 42vw, 180px);
  }

  #wh-estimator .quiz-options-wrapper,
  #wh-estimator .choicesList,
  #wh-estimator .choicesGrid {
    max-height: none;
    overflow: visible;
  }

  #wh-estimator .wh_choice-radio,
  #wh-estimator .quiz-radio,
  #wh-estimator .quiz-checkbox,
  #wh-estimator .choiceMain {
    min-height: 60px;
    padding: 14px;
  }

  #wh-estimator .quiz_option-img-wrapper,
  #wh-estimator .oimg {
    width: 66px;
    height: 46px;
  }

  /* Stacked nav: primary action first, then back, then a quiet "start over"
     link. Buttons size to content height (fixes the ballooned-pill bug). */
  #wh-estimator .quiz_nav-actions,
  #wh-estimator .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 16px;
  }

  #wh-estimator .quiz_next-button,
  #wh-estimator .btn {
    order: -1;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  #wh-estimator .quiz_back-button,
  #wh-estimator .btn.secondary {
    order: 0;
    flex: 0 0 auto;
    width: 100%;
  }

  #wh-estimator .quiz_start-over-button {
    order: 1;
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    margin: 2px auto 0;
    padding: 8px 14px;
  }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  #wh-estimator *,
  #wh-estimator *::before,
  #wh-estimator *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  #wh-estimator .quiz-option,
  #wh-estimator .choice,
  #wh-estimator .quiz_next-button,
  #wh-estimator .quiz_back-button,
  #wh-estimator .quiz_start-over-button {
    transform: none !important;
  }
}
