/* ================================================================
   stx_ht_configurator — guided wall configurator (Lumiere).
   Scoped under .stx-pdp--htcfg; rides on summary.css for the shared
   buy-panel skin (.stx-buy__*, .stx-expert__*). Cards are divs with
   role=radio, so Rey's global button rules never touch them; the
   accordion head IS a <button>, hence the root-scoped reset below.
   ================================================================ */

.stx-pdp--htcfg { display: block; }

.stx-pdp--htcfg .stx-cfg__lede {
  margin: 10px 0 2px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--stx-ink-300);
}

.stx-pdp--htcfg .stx-cfg__steps {
  margin-top: 18px;
  border-top: 1px solid var(--stx-ink-700);
}

/* ---------- Step shell ---------- */
.stx-pdp--htcfg .stx-cfg__step {
  border-bottom: 1px solid var(--stx-ink-700);
}
/* Hidden until the previous step is answered (configurator.js unlocks). */
.stx-pdp--htcfg .stx-cfg__step.is-locked { display: none; }

/* Root-scoped (0,2,0) so Rey's `.btn, button` (0,1,1) loses cleanly. */
.stx-pdp--htcfg .stx-cfg__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 2px;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  color: var(--stx-ink-50);
}
.stx-pdp--htcfg .stx-cfg__head:hover { background: transparent; color: var(--stx-ink-0); }

.stx-pdp--htcfg .stx-cfg__head-title {
  flex: 1;
  font-family: var(--stx-font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: var(--stx-ls-tight);
}

.stx-pdp--htcfg .stx-cfg__head-val {
  font-family: var(--stx-font-mono);
  font-size: 14px;
  color: var(--stx-ink-0);
}

/* plus / minus glyph */
.stx-pdp--htcfg .stx-cfg__head-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}
.stx-pdp--htcfg .stx-cfg__head-icon::before,
.stx-pdp--htcfg .stx-cfg__head-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--stx-ink-300);
  transition: transform .18s ease;
}
.stx-pdp--htcfg .stx-cfg__head-icon::before { width: 14px; height: 1.5px; }
.stx-pdp--htcfg .stx-cfg__head-icon::after  { width: 1.5px; height: 14px; }
.stx-pdp--htcfg .is-open .stx-cfg__head-icon::after { transform: scaleY(0); }

.stx-pdp--htcfg .stx-cfg__body {
  display: none;
  padding: 2px 2px 18px;
}
.stx-pdp--htcfg .is-open > .stx-cfg__body { display: block; }

.stx-pdp--htcfg .stx-cfg__intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--stx-ink-300);
}
.stx-pdp--htcfg .stx-cfg__hint { font-size: 12px; color: var(--stx-ink-400); }

/* ---------- Option cards ---------- */
.stx-pdp--htcfg .stx-cfg__cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(122px, 1fr));
}
.stx-pdp--htcfg .stx-cfg__cards--size { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.stx-pdp--htcfg .stx-cfg__cards--dist { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }

.stx-pdp--htcfg .stx-cfg__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-height: 96px;
  padding: 30px 10px 12px;
  background: var(--stx-ink-900);
  border: 1px solid var(--stx-ink-700);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
  -webkit-user-select: none;
  user-select: none;
}
.stx-pdp--htcfg .stx-cfg__card:hover { border-color: var(--stx-ink-500); transform: translateY(-1px); }
.stx-pdp--htcfg .stx-cfg__card:focus-visible { outline: 2px solid var(--stx-blue); outline-offset: 2px; }
.stx-pdp--htcfg .stx-cfg__card.is-on {
  border-color: var(--stx-blue);
  background: color-mix(in srgb, var(--stx-blue) 10%, var(--stx-ink-900));
}

/* radio dot, top-right */
.stx-pdp--htcfg .stx-cfg__dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--stx-ink-500);
  border-radius: 50%;
  transition: border-color .15s ease, background .15s ease;
}
.stx-pdp--htcfg .stx-cfg__card.is-on .stx-cfg__dot {
  border-color: var(--stx-blue);
  background: radial-gradient(circle, var(--stx-blue) 0 4px, transparent 4.5px);
}

/* dashed TV-width glyph (ratio cards) — width grows with the ratio */
.stx-pdp--htcfg .stx-cfg__tv {
  height: 13px;
  aspect-ratio: var(--cfg-ar, 1.78);
  max-width: 84px;
  margin-bottom: 6px;
  border: 1.5px dashed var(--stx-ink-400);
  border-radius: 2px;
}
.stx-pdp--htcfg .stx-cfg__card.is-on .stx-cfg__tv { border-color: var(--stx-blue); }

/* pitch dot-grid glyph (distance cards) */
.stx-pdp--htcfg .stx-cfg__pitchicon {
  width: 26px;
  height: 26px;
  margin-bottom: 6px;
  color: var(--stx-ink-300);
}
.stx-pdp--htcfg .stx-cfg__card.is-on .stx-cfg__pitchicon { color: var(--stx-blue); }

.stx-pdp--htcfg .stx-cfg__card-label {
  font-family: var(--stx-font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: var(--stx-ls-tight);
  color: var(--stx-ink-50);
}
.stx-pdp--htcfg .stx-cfg__card-sub {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--stx-ink-400);
}

/* ---------- Result: estimate + lead form ---------- */
.stx-pdp--htcfg .stx-cfg__result { margin-top: 18px; }

.stx-pdp--htcfg .stx-cfg__estimate {
  padding: 18px;
  margin-bottom: 14px;
  background: var(--stx-ink-900);
  border: 1px solid var(--stx-ink-700);
  border-radius: 14px;
}
.stx-pdp--htcfg .stx-cfg__est-eyebrow {
  display: block;
  font-family: var(--stx-font-mono);
  font-size: 10.5px;
  letter-spacing: var(--stx-ls-eyebrow);
  text-transform: uppercase;
  color: var(--stx-ink-400);
}
.stx-pdp--htcfg .stx-cfg__est-range {
  margin-top: 6px;
  font-family: var(--stx-font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: var(--stx-fw-light, 300);
  letter-spacing: var(--stx-ls-tight);
  color: var(--stx-ink-0);
}
.stx-pdp--htcfg .stx-cfg__est-spec {
  margin-top: 5px;
  font-family: var(--stx-font-mono);
  font-size: 11.5px;
  color: var(--stx-ink-300);
}
.stx-pdp--htcfg .stx-cfg__est-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--stx-ink-400);
}

/* the shared lead form is styled by summary.css; just pin spacing */
.stx-pdp--htcfg .stx-cfg__expert { margin-top: 0; }

@media (max-width: 480px) {
  .stx-pdp--htcfg .stx-cfg__cards,
  .stx-pdp--htcfg .stx-cfg__cards--dist { grid-template-columns: 1fr 1fr; }
}

/* ================================================================
   Live layout visualizer — overlays the lead gallery image once the
   visitor starts configuring. Injected by configurator.js into
   .stx-gallery__item.is-lead; scoped under .stx-cfgviz (no Rey
   collisions: everything is a div, the toggle is role=button).
   ================================================================ */

.stx-cfgviz {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
  /* the gallery tile sets line-height:0 to kill image whitespace — restore */
  line-height: 1.45;
}
.stx-cfgviz__chip-main { line-height: 1.05; }
.stx-cfgviz__chip-sub  { line-height: 1.3; }
.stx-cfgviz.is-live { opacity: 1; pointer-events: auto; }

/* stage = the room */
.stx-cfgviz__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 55% at 50% 100%, #141419 0%, transparent 60%),
    linear-gradient(180deg, #08080a 0%, #0c0c0f 62%, #101014 100%);
  opacity: 1;
  transition: opacity .35s ease;
}
.stx-cfgviz.is-photos .stx-cfgviz__stage { opacity: 0; pointer-events: none; }

/* floor line + sheen */
.stx-cfgviz__floor {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stx-ink-600) 18%, var(--stx-ink-600) 82%, transparent);
}

/* the wall — JS sets left/top/width/height in px; transitions morph it */
.stx-cfgviz__wall {
  position: absolute;
  border-radius: 3px;
  transition: left .55s cubic-bezier(.22,.7,.25,1), top .55s cubic-bezier(.22,.7,.25,1),
              width .55s cubic-bezier(.22,.7,.25,1), height .55s cubic-bezier(.22,.7,.25,1);
}

/* glowing screen content */
.stx-cfgviz__screen {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 82%, rgba(37, 99, 235, .55), transparent 60%),
    radial-gradient(110% 85% at 82% 15%, rgba(124, 58, 237, .5), transparent 58%),
    radial-gradient(90% 120% at 70% 95%, rgba(6, 182, 212, .4), transparent 55%),
    linear-gradient(135deg, #0b3aa5 0%, #3b3fd8 38%, #7b2fd1 68%, #0e6ecf 100%);
  background-size: 160% 160%;
  animation: stx-cfgviz-pan 16s ease-in-out infinite alternate;
  /* Muted to match the ghost (step-1) tone — the screen keeps the same
     deep, quiet color once a size is picked instead of flaring bright. */
  opacity: .34;
  box-shadow: 0 0 40px rgba(80, 110, 255, .12);
}
@keyframes stx-cfgviz-pan {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

/* panel seams — dashed hairlines, one layer per direction so the dash mask
   runs perpendicular to its lines without erasing the other axis.
   JS sets background-size to 100%/cols (v) and 100%/rows (h). */
.stx-cfgviz__seams {
  position: absolute;
  inset: 0;
  border-radius: 3px;
  overflow: hidden;
  opacity: .55;
}
.stx-cfgviz__seams-v,
.stx-cfgviz__seams-h {
  position: absolute;
  inset: 0;
  transition: background-size .55s cubic-bezier(.22,.7,.25,1);
}
.stx-cfgviz__seams-v {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, .8) 0 1px, transparent 1px);
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 11px);
  mask-image: repeating-linear-gradient(180deg, #000 0 6px, transparent 6px 11px);
}
.stx-cfgviz__seams-h {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, .8) 0 1px, transparent 1px);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 11px);
  mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 11px);
}
.stx-cfgviz__wall { border: 1px solid rgba(255, 255, 255, .16); }

/* ghost state — ratio picked, size not yet */
.stx-cfgviz.is-ghost .stx-cfgviz__screen { opacity: .3; animation-play-state: paused; box-shadow: none; }
.stx-cfgviz.is-ghost .stx-cfgviz__seams { opacity: .25; }
.stx-cfgviz.is-ghost .stx-cfgviz__wall { border: 1.5px dashed var(--stx-ink-400); }

/* floor reflection */
.stx-cfgviz__reflect {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 34%;
  transform: scaleY(-1);
  border-radius: 3px;
  background: inherit;
  opacity: .16;
  -webkit-mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 30%, #000 100%);
  pointer-events: none;
}
.stx-cfgviz.is-ghost .stx-cfgviz__reflect { opacity: 0; }

/* diagonal chip — caption centered under the drawing, off the screen.
   JS sets left (wall midpoint) / top (below the floor line). */
.stx-cfgviz__chip {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  white-space: nowrap;
  transition: left .55s cubic-bezier(.22,.7,.25,1), top .55s cubic-bezier(.22,.7,.25,1);
}
.stx-cfgviz__chip-main {
  font-family: var(--stx-font-display);
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: var(--stx-fw-light, 300);
  letter-spacing: var(--stx-ls-tight);
  color: #fff;
}
.stx-cfgviz__chip-sub {
  font-family: var(--stx-font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

/* dimension labels */
.stx-cfgviz__dim {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--stx-font-mono);
  font-size: 11px;
  color: var(--stx-ink-300);
  white-space: nowrap;
  transition: left .55s cubic-bezier(.22,.7,.25,1), top .55s cubic-bezier(.22,.7,.25,1),
              width .55s cubic-bezier(.22,.7,.25,1), height .55s cubic-bezier(.22,.7,.25,1),
              opacity .3s ease;
}
/* dimension bars carry a centered hairline plus a small end tick at the
   outer edge — reads like a blueprint dimension line */
.stx-cfgviz__dim--w { justify-content: center; }
.stx-cfgviz__dim--w::before,
.stx-cfgviz__dim--w::after {
  content: '';
  flex: 1;
  height: 7px;
}
.stx-cfgviz__dim--w::before {
  background:
    linear-gradient(90deg, var(--stx-ink-500) 0 1px, transparent 1px),
    linear-gradient(180deg, transparent 3px, var(--stx-ink-600) 3px 4px, transparent 4px);
}
.stx-cfgviz__dim--w::after {
  background:
    linear-gradient(270deg, var(--stx-ink-500) 0 1px, transparent 1px),
    linear-gradient(180deg, transparent 3px, var(--stx-ink-600) 3px 4px, transparent 4px);
}
.stx-cfgviz__dim--h {
  flex-direction: column;
  justify-content: center;
  width: auto !important;
}
.stx-cfgviz__dim--h::before,
.stx-cfgviz__dim--h::after {
  content: '';
  flex: 1;
  width: 7px;
}
.stx-cfgviz__dim--h::before {
  background:
    linear-gradient(180deg, var(--stx-ink-500) 0 1px, transparent 1px),
    linear-gradient(90deg, transparent 3px, var(--stx-ink-600) 3px 4px, transparent 4px);
}
.stx-cfgviz__dim--h::after {
  background:
    linear-gradient(0deg, var(--stx-ink-500) 0 1px, transparent 1px),
    linear-gradient(90deg, transparent 3px, var(--stx-ink-600) 3px 4px, transparent 4px);
}
.stx-cfgviz.is-ghost .stx-cfgviz__dim { opacity: 0; }

/* person silhouette for scale */
.stx-cfgviz__person {
  position: absolute;
  color: var(--stx-ink-600);
  transition: left .55s cubic-bezier(.22,.7,.25,1), top .55s cubic-bezier(.22,.7,.25,1),
              height .55s cubic-bezier(.22,.7,.25,1);
}
.stx-cfgviz__person svg { display: block; height: 100%; width: auto; }
.stx-cfgviz__person-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  font-family: var(--stx-font-mono);
  font-size: 10px;
  color: var(--stx-ink-500);
}

/* meta strip, bottom-left */
.stx-cfgviz__meta {
  position: absolute;
  left: 14px;
  bottom: 12px;
  font-family: var(--stx-font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--stx-ink-300);
}

/* photos / layout toggle pill */
.stx-cfgviz__toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-family: var(--stx-font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stx-ink-100);
  background: rgba(16, 16, 20, .72);
  border: 1px solid var(--stx-ink-600);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  -webkit-user-select: none;
  user-select: none;
}
.stx-cfgviz__toggle:hover { border-color: var(--stx-ink-400); color: #fff; }

