/* ==========================================================================
   HID Extension — Hair Finder Quiz Styles
   ========================================================================== */

/* ── Scoped box-sizing reset ─────────────────────────────────────────────── */

.hid-hair-finder-wrap,
.hid-hair-finder-wrap * {
  box-sizing: border-box;
}

/* ── Shared hero (same class used by store-locator template) ─────────────── */

.hid-hero {
  background-color: #f0f6e7;
  padding: 80px 24px;
  text-align: center;
}

.hid-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.hid-hero h1 {
  font-size: 52px;
  font-weight: 800;
  color: #2a2a2a;
  line-height: 1.15;
  margin: 0 0 16px;
}

.hid-hero p {
  font-size: 16px;
  color: #9e9e9e;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Outer quiz wrapper ──────────────────────────────────────────────────── */

.hid-hair-finder-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* ── Panel ───────────────────────────────────────────────────────────────── */

.hid-quiz-panel {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 36px 40px 32px;
}

/* ── Header: step label + progress bar ──────────────────────────────────── */

.hid-quiz-header {
  margin-bottom: 28px;
}

.hid-step-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9e9e9e;
  margin-bottom: 8px;
}

.hid-progress-bar {
  width: 100%;
  height: 4px;
  background-color: #d6eac8;
  border-radius: 4px;
  overflow: hidden;
}

.hid-progress-fill {
  height: 100%;
  background-color: #67bd50;
  border-radius: 4px;
  width: 0;
  transition: width 300ms ease;
}

/* ── Step headings ───────────────────────────────────────────────────────── */

.hid-step-heading {
  font-size: 22px;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 24px;
  line-height: 1.3;
}

/* ── Option grids ────────────────────────────────────────────────────────── */

.hid-options-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.hid-options-2 {
  grid-template-columns: 1fr 1fr;
}

.hid-options-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ── Option card ─────────────────────────────────────────────────────────── */

.hid-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 12px;
  background: #ffffff;
  border: 2px solid #d6eac8;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
  font-family: inherit;
}

.hid-option-card:hover {
  border-color: #67bd50;
  background-color: #f0f6e7;
}

.hid-option-card.selected,
.hid-option-card:focus-visible {
  border-color: #67bd50;
  background-color: #f0f6e7;
  transform: scale(1.02);
  outline: none;
}

/* Child-path cards use pink accent */
.hid-options-child .hid-option-card:hover,
.hid-option-child:hover {
  border-color: #ef5d97;
  background-color: #fdeef5;
}

.hid-options-child .hid-option-card.selected,
.hid-option-child.selected {
  border-color: #ef5d97;
  background-color: #fdeef5;
  transform: scale(1.02);
}

.hid-option-icon {
  font-size: 28px;
  line-height: 1;
}

.hid-option-label {
  font-size: 14px;
  font-weight: 600;
  color: #2a2a2a;
  line-height: 1.3;
}

/* ── Navigation: back button ─────────────────────────────────────────────── */

.hid-quiz-nav {
  margin-top: 20px;
}

.hid-back-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #9e9e9e;
  cursor: pointer;
  font-family: inherit;
  transition: color 160ms ease;
}

.hid-back-btn:hover {
  color: #2a2a2a;
}

/* ── Email capture / loading ─────────────────────────────────────────────── */

.hid-step-loading {
  text-align: center;
  color: #9e9e9e;
  padding: 32px 0;
  font-size: 15px;
}

.hid-forminator-wrap {
  margin: 0 0 16px;
}

.hid-skip-wrap {
  text-align: center;
  margin: 4px 0 0;
}

.hid-skip-btn {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #9e9e9e;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  transition: color 160ms ease;
}

.hid-skip-btn:hover {
  color: #2a2a2a;
}

/* ── Result headings ─────────────────────────────────────────────────────── */

.hid-result-container {
  padding: 4px 0 0;
}

.hid-result-heading {
  font-size: 24px;
  font-weight: 800;
  color: #2a2a2a;
  margin: 0 0 6px;
}

.hid-result-subheading {
  font-size: 14px;
  color: #9e9e9e;
  margin: 0 0 24px;
}

.hid-result-intro {
  font-size: 15px;
  color: #2a2a2a;
  margin: 0 0 20px;
  line-height: 1.6;
}

.hid-result-disclaimer {
  font-size: 12px;
  color: #9e9e9e;
  margin: 16px 0 0;
}

/* ── Product card (primary) ──────────────────────────────────────────────── */

.hid-product-card {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 16px;
}

.hid-product-primary {
  border: 2px solid #67bd50;
  background-color: #ffffff;
}

.hid-product-card-inner {
  display: flex;
  gap: 20px;
  padding: 24px;
  align-items: flex-start;
}

.hid-product-image-wrap {
  flex-shrink: 0;
  width: 120px;
}

.hid-product-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  max-height: 160px;
}

.hid-product-details {
  flex: 1;
  min-width: 0;
}

.hid-range-label {
  font-size: 18px;
  font-weight: 700;
  color: #2a2a2a;
  margin: 0 0 10px;
}

/* ── Reason bullets ──────────────────────────────────────────────────────── */

.hid-reason-bullets {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.hid-reason-bullets li {
  font-size: 13px;
  color: #2a2a2a;
  padding: 4px 0 4px 18px;
  position: relative;
  line-height: 1.45;
}

.hid-reason-bullets li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  top: 4px;
  color: #67bd50;
  font-size: 11px;
}

/* ── Product CTAs ────────────────────────────────────────────────────────── */

.hid-product-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hid-btn-cart {
  display: inline-block;
  background-color: #67bd50;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.hid-btn-cart:hover {
  background-color: #55a23e;
  transform: translateY(-1px);
  color: #ffffff;
}

/* Brown variant for secondary product / both-path */
.hid-btn-cart-secondary {
  background-color: #673e2e;
}

.hid-btn-cart-secondary:hover {
  background-color: #532f22;
  color: #ffffff;
}

.hid-btn-cart-both {
  /* Same green as primary */
}

.hid-link-view {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #67bd50;
  text-decoration: underline;
  transition: color 160ms ease;
}

.hid-link-view:hover {
  color: #55a23e;
}

.hid-btn-whatsapp {
  display: inline-block;
  background: none;
  border: 2px solid #67bd50;
  color: #67bd50;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.hid-btn-whatsapp:hover {
  background-color: #f0f6e7;
  color: #67bd50;
}

.hid-btn-locator {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #2a2a2a;
  text-decoration: underline;
  transition: color 160ms ease;
}

.hid-btn-locator:hover {
  color: #67bd50;
}

/* ── Secondary "Also Recommended" product card ───────────────────────────── */

.hid-product-secondary {
  border: 1px solid #d6eac8;
  background-color: #f6eff6;
}

.hid-also-recommended-badge {
  display: inline-block;
  background-color: #673e2e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 0 0 8px 0;
}

/* ── Both path grid ───────────────────────────────────────────────────────── */

.hid-both-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.hid-both-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #d6eac8;
  padding: 20px 16px;
}

.hid-both-card-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9e9e9e;
  margin: 0 0 12px;
}

/* Both path CTAs row */
.hid-add-both {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

/* Bundle CTA */
.hid-bundle-cta {
  background: #fffacc;
  border-radius: 10px;
  padding: 18px 20px;
  text-align: center;
  margin-bottom: 16px;
}

.hid-bundle-cta p {
  font-size: 14px;
  color: #2a2a2a;
  margin: 0 0 10px;
}

/* ── Result footer ────────────────────────────────────────────────────────── */

.hid-result-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hid-retake-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: #9e9e9e;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  transition: color 160ms ease;
}

.hid-retake-btn:hover {
  color: #2a2a2a;
}

.hid-link-browse-all {
  font-size: 13px;
  font-weight: 600;
  color: #67bd50;
  text-decoration: underline;
  transition: color 160ms ease;
}

.hid-link-browse-all:hover {
  color: #55a23e;
}

/* ── Responsive — 768px ───────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hid-hero {
    padding: 60px 20px;
  }

  .hid-hero h1 {
    font-size: 36px;
  }

  .hid-quiz-panel {
    padding: 28px 20px 24px;
  }

  .hid-options-3 {
    grid-template-columns: 1fr 1fr;
  }

  .hid-both-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .hid-product-card-inner {
    flex-direction: column;
  }

  .hid-product-image-wrap {
    width: 100%;
    max-width: 160px;
  }
}

/* ── Responsive — 480px ───────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .hid-hero {
    padding: 48px 16px 40px;
  }

  .hid-hero h1 {
    font-size: 28px;
  }

  .hid-hair-finder-wrap {
    padding: 24px 12px 48px;
  }

  .hid-quiz-panel {
    padding: 22px 14px 18px;
    border-radius: 12px;
  }

  .hid-options-2,
  .hid-options-3 {
    grid-template-columns: 1fr;
  }

  .hid-step-heading {
    font-size: 18px;
  }

  .hid-result-heading {
    font-size: 20px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .hid-progress-fill,
  .hid-option-card,
  .hid-btn-cart,
  .hid-btn-whatsapp,
  .hid-back-btn,
  .hid-skip-btn,
  .hid-link-view,
  .hid-btn-locator,
  .hid-retake-btn,
  .hid-link-browse-all {
    transition: none;
    animation: none;
  }
}
