/*
 * Rendered inside the real site template (bitrix/header.php + footer.php),
 * so headings/body already inherit the site's fonts (Cera Pro / Mulish) and
 * buttons reuse the site's own .btn / .btn--wall / .btn--white classes —
 * this file only adds the quiz-specific UI (option cards, symptom grid,
 * progress bar, results layout) on top of that.
 * Colors/spacing beyond what's confirmed from the live site are still an
 * approximation pending full Figma access (rate-limited on Starter plan).
 */
/* The site hides .breadcrumbs by some mechanism we couldn't trace in its
   CSS (no matching rule found on audit) — force it visible on this page. */
.breadcrumbs { display: block !important; margin-top: 10px !important; }
/* Quiz page only (this stylesheet isn't loaded elsewhere): no floating messenger buttons, no promo popup. */
.wd-contact, .popup--bnr { display: none !important; }
/* .wrapper's own top padding (clearance under the fixed header, ~57px tall)
   is 75px on desktop widths. 40px would tuck the breadcrumb under the fixed
   header, so keep a bit of margin above that floor. */
.wrapper { padding-top: 65px !important; }

.quiz {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 120px;
  color: #2b2829;
}

.quiz__title {
  text-align: center;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 40px;
}
.quiz__title--left { text-align: left; margin-bottom: 8px; }

.quiz__subtitle {
  text-align: center;
  color: #8a8a8a;
  font-size: 15px;
  margin: 0 0 24px;
}
.quiz__subtitle--left { text-align: left; max-width: 640px; }

.quiz__divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 24px 0 40px;
}

.quiz__card { max-width: 720px; margin: 0 auto; }

.quiz__progress { margin-bottom: 28px; }
.quiz__progress-label { display: block; font-size: 12px; color: #999; margin-bottom: 6px; }
.quiz__progress-track { height: 2px; background: #e5e5e5; }
.quiz__progress-fill { height: 100%; background: #2b2829; transition: width .2s ease; }

.quiz__question {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0 0 20px;
}

.quiz__options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.quiz__option {
  height: 155px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  /* <button> doesn't inherit color: iOS Safari defaults it to system blue (desktop Chrome to black). */
  color: #2b2829;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit; /* buttons don't inherit the page font by default */
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  cursor: pointer;
}
.quiz__option:hover { border-color: #bbb; }
.quiz__option.is-selected { background: #2b2829; color: #fff; border-color: #2b2829; }

.quiz__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.quiz__chip {
  height: 130px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #888;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit; /* buttons don't inherit the page font by default */
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  cursor: pointer;
  padding: 0 8px;
}
.quiz__chip:hover { border-color: #bbb; }
.quiz__chip.is-selected { background: #2b2829; color: #fff; border-color: #2b2829; }

.quiz__hint { margin: -8px 0 20px; color: #888; font-size: 14px; }

.quiz__aromas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.quiz__aroma {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #2b2829;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.quiz__aroma:hover { border-color: #bbb; }
.quiz__aroma.is-selected { background: #2b2829; color: #fff; border-color: #2b2829; }
.quiz__aroma-icon { display: inline-flex; width: 32px; height: 32px; }
.quiz__aroma-name { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.quiz__aroma-tagline { font-size: 14px; font-weight: 700; line-height: 1.35; }
.quiz__aroma-pitch { font-size: 13px; line-height: 1.5; }
.quiz__aroma-text { font-size: 12px; line-height: 1.45; opacity: .65; }

.quiz__yesno { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.quiz__yn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}
.quiz__yn-label { margin: 0; font-size: 14px; line-height: 1.4; color: #2b2829; }
.quiz__yn-btns { display: flex; gap: 8px; flex-shrink: 0; }
.quiz__yn-btn {
  min-width: 64px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #888;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}
.quiz__yn-btn:hover { border-color: #bbb; }
.quiz__yn-btn.is-selected { background: #2b2829; color: #fff; border-color: #2b2829; }

.quiz__btn:disabled { opacity: .4; cursor: default; }

.quiz__textarea {
  width: 100%;
  min-height: 220px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 24px;
}

.quiz__nav { display: flex; justify-content: space-between; align-items: center; }
.quiz__nav--center { justify-content: center; }

/* .btn / .btn--wall / .btn--white are the site's own button classes (bg,
   color, radius, padding, height, uppercase, disabled state) — .quiz__btn
   only adds the layout bits specific to this anketa. */
.quiz__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
/* The site's .btn defaults to filling its container — our nav buttons sit
   in a flex row and should size to their (short) label instead. */
.quiz__nav .quiz__btn { width: auto; min-width: 130px; flex: 0 0 auto; }
/* Belt-and-braces: suppress any decorative icon the site's own .btn/.btn--wall/
   .btn--white classes might draw via pseudo-elements, so only our own
   .quiz__btn-arrow (added explicitly on primary actions) ever shows. */
.quiz__btn::before, .quiz__btn::after { content: none !important; display: none !important; }
.quiz__btn--small { height: 40px; }
/* .btn--white has no border by default — the site uses it on colored
   backgrounds where it contrasts on its own; ours is plain white. */
.quiz .btn--white { border: 1px solid #e0e0e0; }
.quiz .btn--white.disabled { color: #ccc; border-color: #eee; }
.quiz__btn--wide { display: flex; width: 100%; justify-content: center; margin-top: 32px; }
.quiz__btn-arrow {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); font-size: 12px;
}
.btn--white .quiz__btn-arrow { background: #f2f2f2; color: #999; }

.quiz__loading { text-align: center; color: #999; padding: 80px 0; }

/* Results */
.quiz--result { max-width: 1040px; }

.quiz__routine {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.quiz__routine--single { grid-template-columns: 1fr; }
.quiz__routine-title { font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.quiz__routine-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: #333; }
.quiz__routine-list li { margin-bottom: 8px; }

.quiz__note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #f7f7f7;
  border-radius: 4px;
  font-size: 13px;
  color: #555;
}
.quiz__note-icon {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid #999;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-style: italic; color: #999;
}

.quiz__section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.quiz__section-title { font-size: 22px; font-weight: 400; margin: 0; }

.quiz__products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.quiz__product-card { text-align: left; }
.quiz__product-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: #f2f2f2;
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}
.quiz__product-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.quiz__product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  background: #fff;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.quiz__product-article { font-size: 12px; color: #aaa; margin-bottom: 4px; }
.quiz__product-name {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 6px;
  min-height: 2.8em;
  color: inherit;
  text-decoration: none;
}
.quiz__product-name:hover { text-decoration: underline; }
.quiz__product-price { font-size: 16px; font-weight: 700; }

/* Cards rendered by the site's own catalog template (api/cards.php) — keep its markup, just lay the
   per-product wrappers out in our grid instead of letting their content size the columns. */
.quiz__products--site { align-items: start; gap: 16px 20px; }
.quiz__products--site .aihelper-card { min-width: 0; overflow-wrap: anywhere; }
.quiz__products--site .catalog__items { display: block; width: 100%; margin: 0; }
.quiz__products--site .product-item-container,
.quiz__products--site .product-item { width: 100%; max-width: none; }

.quiz__complexes { margin: 0 0 32px; }
.quiz__complex-link {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
div.quiz__complex-link { text-decoration: none; }
.quiz__cart-error { margin: 12px 0 0; text-align: center; font-size: 13px; color: #b3261e; }

@media (max-width: 720px) {
  .quiz__section-head { flex-direction: column; align-items: stretch; gap: 16px; }
  .quiz__section-head .btn { width: 100%; justify-content: center; }
  .quiz__options, .quiz__grid { grid-template-columns: 1fr 1fr; }
  .quiz__aromas { grid-template-columns: 1fr; }
  .quiz__yn { flex-direction: column; align-items: stretch; }
  .quiz__yn-btns { justify-content: flex-start; }
  .quiz__routine { grid-template-columns: 1fr; }
  .quiz__products { grid-template-columns: 1fr 1fr; }
  .quiz__title { font-size: 26px; }
}

/* The product of a routine step: its own highlighted line above the instruction. */
.quiz__step-product {
  display: block;
  margin-bottom: 2px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.quiz__step-product:hover { text-decoration: underline; }
.quiz__step-text { display: block; }

.quiz__routine-subtitle { margin: 24px 0 4px; font-size: 15px; font-weight: 700; }
.quiz__step-note { display: block; margin: -2px 0 10px; color: #888; font-size: 13px; line-height: 1.45; }

.quiz__chip:disabled, .quiz__chip.is-disabled { opacity: .35; cursor: not-allowed; }
.quiz__chip:disabled:hover { border-color: #e0e0e0; }

.quiz__choices { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.quiz__choice-group { display: flex; flex-direction: column; gap: 12px; }
.quiz__choice-question { margin: 0; font-size: 15px; font-weight: 700; }
.quiz__choice {
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  color: #2b2829;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.quiz__choice:hover { border-color: #bbb; }
.quiz__choice.is-selected { background: #2b2829; color: #fff; border-color: #2b2829; }

.quiz__calendar { margin: 0 0 32px; }
.quiz__calendar-scroll { overflow-x: auto; margin-bottom: 12px; }
.quiz__calendar-table { border-collapse: collapse; font-size: 13px; min-width: 560px; width: 100%; }
.quiz__calendar-table th, .quiz__calendar-table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: center; }
.quiz__calendar-table th { font-weight: 700; background: #f7f7f7; }
.quiz__calendar-table td.is-retinol { background: #2b2829; color: #fff; }
.quiz__routine-hint { margin: 0 0 8px; color: #888; font-size: 13px; line-height: 1.45; }

.quiz__intro { margin: 0 0 24px; font-size: 16px; line-height: 1.5; }
.quiz__extra { margin: 0 0 32px; max-width: 720px; }
.quiz__step-product--inline { display: inline; margin: 0; }
.quiz__step-note { list-style: none; }
.quiz__routine + .quiz__note, .quiz__extra + .quiz__note, .quiz__calendar + .quiz__note { margin-top: 0; }
.quiz__note { margin-bottom: 16px; }
