/* ==========================================================================
   RADICO Workspace Advisor
   Full screen over the page it was opened from, the way Branch Furniture's
   quiz is: a warm ground, the logo and a close button and nothing else, one
   question at a time with a line drawing over it, answers as outlined tiles.
   ========================================================================== */

html.radico-adv-open,
html.radico-adv-open body { overflow: hidden; }

/* The quiz's own page shows nothing of its own; the overlay is the page. */
.radico-advisor-page { min-height: 60vh; }

.radico-adv {
  --adv-ink: var(--radico-blue-950, #0B2F41);
  --adv-muted: #5E6E75;
  --adv-ground: #F4F0E6;
  --adv-tile: #FFFDF8;
  --adv-line: rgba(11, 47, 65, .22);
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--adv-ground);
  color: var(--adv-ink);
  font-family: var(--radico-font);
  -webkit-font-smoothing: antialiased;
}
.radico-adv[hidden] { display: none; }

/* Hello Elementor styles every <button> — nowrap, its own border and a pink
   hover. Inside the quiz none of that applies: this is what broke the long
   answers, which ran out of their tiles on one line. */
.radico-adv button {
  white-space: normal;
  text-transform: none;
  letter-spacing: normal;
  font-family: inherit;
  border-radius: 0;
  box-shadow: none;
}
.radico-adv button:focus-visible,
.radico-adv a:focus-visible { outline: 2px solid var(--adv-ink); outline-offset: 3px; }
.radico-adv h1:focus,
.radico-adv h2:focus { outline: none; }

/* ---- bar -------------------------------------------------------------------- */
.radico-adv__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) clamp(20px, 5vw, 72px) 22px;
  background: var(--adv-ground);
}
.radico-adv__logo { display: block; width: 128px; height: auto; }
.radico-adv .radico-adv__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--adv-ink);
  cursor: pointer;
}
.radico-adv .radico-adv__close:hover { background: rgba(11, 47, 65, .06); color: var(--adv-ink); }

.radico-adv__main { padding: 8px clamp(20px, 5vw, 72px) calc(env(safe-area-inset-bottom, 0px) + 120px); }
.radico-adv__loading { margin: 20vh 0 0; text-align: center; color: var(--adv-muted); }

/* ---- shared type ------------------------------------------------------------- */
.radico-adv__screen { max-width: 760px; margin: 0 auto; text-align: center; }
.radico-adv__icon { display: block; width: 64px; height: 64px; margin: 0 auto 20px; object-fit: contain; }
.radico-adv__eyebrow {
  margin: 0 0 14px;
  font: 600 13px/1.4 var(--radico-font);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--adv-muted);
}
.radico-adv__title {
  margin: 0 auto 18px;
  max-width: 20ch;
  font: 700 clamp(30px, 4.2vw, 48px)/1.12 var(--radico-font);
  text-wrap: balance;
}
.radico-adv__lead {
  max-width: 56ch;
  margin: 0 auto 36px;
  font: 300 18px/1.6 var(--radico-font);
  text-wrap: pretty;
}

/* ---- buttons ----------------------------------------------------------------- */
.radico-adv .radico-adv__primary,
.radico-adv .radico-adv__secondary,
.radico-adv .radico-adv__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 40px;
  border: 1.5px solid var(--adv-ink);
  font: 600 16px/1.2 var(--radico-font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.radico-adv .radico-adv__primary,
.radico-adv .radico-adv__add { background: var(--adv-ink); color: #fff; }
.radico-adv .radico-adv__primary:hover,
.radico-adv .radico-adv__add:hover { background: #163F54; color: #fff; }
.radico-adv .radico-adv__secondary { background: transparent; color: var(--adv-ink); }
.radico-adv .radico-adv__secondary:hover { background: var(--adv-ink); color: #fff; }

/* ---- a question -------------------------------------------------------------- */
.radico-adv__steptop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font: 400 14px/1.4 var(--radico-font);
  color: var(--adv-muted);
}
.radico-adv .radico-adv__back {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--adv-ink);
  font: 500 14px/1.4 var(--radico-font);
  cursor: pointer;
}
.radico-adv .radico-adv__back:hover { background: none; color: var(--adv-ink); text-decoration: underline; text-underline-offset: 3px; }
.radico-adv__count { font-variant-numeric: tabular-nums; }
.radico-adv__progress {
  height: 3px;
  margin-bottom: clamp(32px, 6vh, 56px);
  background: rgba(11, 47, 65, .12);
}
.radico-adv__progress span { display: block; height: 100%; background: var(--adv-ink); transition: width .3s ease; }

.radico-adv__question {
  max-width: 24ch;
  margin: 0 auto 36px;
  font: 700 clamp(24px, 3.2vw, 36px)/1.2 var(--radico-font);
  text-wrap: balance;
}

.radico-adv__options { display: grid; gap: 14px; margin: 0 auto; }
/* Short answers ("170–179 см") as tiles in a row. */
.radico-adv__options.is-compact {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  max-width: 760px;
}
/* Long answers as a list, one to a line, where the sentence has room. */
.radico-adv__options.is-list { grid-template-columns: minmax(0, 1fr); max-width: 600px; }

.radico-adv .radico-adv__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: 16px 22px;
  border: 1.5px solid var(--adv-line);
  background: var(--adv-tile);
  color: var(--adv-ink);
  font: 500 17px/1.4 var(--radico-font);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.radico-adv__options.is-compact .radico-adv__option { min-height: 96px; padding: 16px 12px; font-size: 18px; }
/* "Под 160 см" is one thing; it does not break before "см". */
.radico-adv .radico-adv__options.is-compact .radico-adv__option { white-space: nowrap; }
.radico-adv__options.is-list .radico-adv__option { justify-content: flex-start; text-align: left; }
.radico-adv .radico-adv__option:hover { border-color: var(--adv-ink); background: #fff; color: var(--adv-ink); }
.radico-adv .radico-adv__option.is-chosen { border-color: var(--adv-ink); background: var(--adv-ink); color: #fff; }
.radico-adv__option-text { min-width: 0; overflow-wrap: anywhere; }

/* ---- the result ---------------------------------------------------------------- */
.radico-adv__result { max-width: 1120px; }
.radico-adv__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin: 0 0 clamp(48px, 7vw, 88px);
  text-align: left;
}
.radico-adv__card { display: flex; flex-direction: column; background: #fff; }
.radico-adv__card-media { display: block; aspect-ratio: 1; background: #F3F5F6; }
.radico-adv__card-media img { width: 100%; height: 100%; display: block; object-fit: contain; }
.radico-adv__card-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 24px 24px 28px; }
.radico-adv__card-title { margin: 0 0 6px; font: 700 24px/1.2 var(--radico-font); }
.radico-adv__card-title a { color: inherit; text-decoration: none; }
.radico-adv__card-tagline { margin: 0 0 16px; font: 300 15px/1.5 var(--radico-font); color: var(--adv-muted); }

.radico-adv__feel {
  margin: 0 0 18px;
  padding: 10px 0;
  border-block: 1px solid #E6E9EA;
}
/* One row per scale, name on the left and the client's word on the right: three
   across did not fit a card's width and the words ran into each other. */
.radico-adv__feel div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 0;
}
.radico-adv__feel dt { font: 300 14px/1.4 var(--radico-font); color: var(--adv-muted); }
.radico-adv__feel dd { margin: 0; font: 600 14px/1.4 var(--radico-font); text-align: right; }

.radico-adv__label { margin: 4px 0 8px; font: 700 14px/1.4 var(--radico-font); }
.radico-adv__why,
.radico-adv__mind { margin: 0 0 16px; padding: 0; list-style: none; font: 300 15px/1.5 var(--radico-font); }
.radico-adv__why li,
.radico-adv__mind li { position: relative; padding-left: 26px; }
.radico-adv__why li + li,
.radico-adv__mind li + li { margin-top: 6px; }
.radico-adv__why li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #E3EEE6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2L11.5 5.6' fill='none' stroke='%232E6B3F' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.radico-adv__mind li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: .3em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #F6E9D2;
  color: #8A5300;
  font: 700 11px/16px var(--radico-font);
  text-align: center;
}
.radico-adv__facts { margin: 0 0 18px; font: 300 14px/1.5 var(--radico-font); color: var(--adv-muted); }

.radico-adv__buy { margin-top: auto; padding-top: 18px; border-top: 1px solid #E6E9EA; }
.radico-adv__swatch-label { display: block; margin-bottom: 8px; font: 400 14px/1.4 var(--radico-font); color: var(--adv-muted); }
.radico-adv__swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.radico-adv .radico-adv__swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(11, 47, 65, .2);
  background: var(--swatch) center / cover no-repeat;
  cursor: pointer;
}
.radico-adv .radico-adv__swatch:hover { border-color: var(--adv-ink); background-color: var(--swatch); }
.radico-adv .radico-adv__swatch.is-on { outline: 2px solid var(--adv-ink); outline-offset: 2px; }
.radico-adv__price { margin: 0 0 14px; font: 700 22px/1.2 var(--radico-font); font-variant-numeric: tabular-nums; }
.radico-adv .radico-adv__add { width: 100%; }
.radico-adv .radico-adv__add.is-done { background: #2E6B3F; border-color: #2E6B3F; }
.radico-adv .radico-adv__add:disabled { cursor: default; }
.radico-adv__added { margin: 10px 0 0; font: 400 14px/1.4 var(--radico-font); color: #2E6B3F; }
.radico-adv__added a { color: inherit; font-weight: 600; }
.radico-adv__more {
  display: inline-block;
  margin-top: 14px;
  font: 500 15px/1.4 var(--radico-font);
  color: var(--adv-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---- workspace advice ----------------------------------------------------------- */
.radico-adv__workspace { padding: clamp(28px, 5vw, 56px); background: #fff; text-align: left; }
.radico-adv__subtitle { margin: 0 0 8px; font: 700 clamp(24px, 3vw, 32px)/1.2 var(--radico-font); }
.radico-adv__note { max-width: 62ch; margin: 0 0 24px; font: 300 16px/1.6 var(--radico-font); color: var(--adv-muted); }
.radico-adv__advice {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid #E6E9EA;
  font: 300 16px/1.6 var(--radico-font);
}
.radico-adv__advice p { margin: 0; max-width: 70ch; }
.radico-adv__advice-product { margin-top: 8px !important; font-size: 14px; color: var(--adv-muted); }
.radico-adv__badge {
  align-self: start;
  justify-self: start;
  padding: 6px 12px;
  border-radius: 999px;
  font: 600 12px/1.2 var(--radico-font);
  letter-spacing: .03em;
}
.radico-adv__badge.is-action { background: #F7DED9; color: #8E2A1E; }
.radico-adv__badge.is-check { background: #F6E9D2; color: #7A4A00; }
.radico-adv__badge.is-improve { background: #E3ECF0; color: var(--adv-ink); }
.radico-adv__badge.is-ok { background: #E3EEE6; color: #2E6B3F; }

.radico-adv__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 32px;
  margin-top: 40px;
}
.radico-adv__link { color: var(--adv-ink); text-decoration: underline; text-underline-offset: 4px; }

/* "2 стола в количката · Към количката", once something is added. */
.radico-adv__basket {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 14px 20px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(11, 47, 65, .08);
  font: 500 16px/1.4 var(--radico-font);
}
.radico-adv__basket .radico-adv__primary { min-height: 48px; padding: 0 28px; }

@media (max-width: 767px) {
  .radico-adv__logo { width: 110px; }
  .radico-adv__icon { width: 52px; height: 52px; margin-bottom: 14px; }
  .radico-adv__options.is-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radico-adv .radico-adv__option { min-height: 60px; font-size: 16px; padding: 14px 16px; }
  .radico-adv__advice { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .radico-adv__basket { justify-content: space-between; }
}
