/* Configurator layout. Colors, type and buttons come from ../styles.css. */
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
/* 87px = header 55 + demo bar 32, so the room buttons are on screen when the page opens */
.viewer { position: sticky; top: 55px; height: calc(100vh - 87px); min-height: 420px; background: #dfe7ea; overflow: hidden; }
.viewer canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.viewer canvas:active { cursor: grabbing; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); background: #dfe7ea; }
.view-top { position: absolute; top: 14px; right: 14px; }
.hint { position: absolute; top: 14px; left: 14px; margin: 0; font-size: .82rem; color: #fff; background: rgba(29, 35, 32, .62);
  padding: 6px 12px; border-radius: 999px; pointer-events: none; transition: opacity .4s; }
.hint.off { opacity: 0; }
.rooms { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.rooms button { border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 253, 249, .9); color: var(--ink);
  font: 600 .88rem var(--sans); padding: 9px 15px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px); }
.rooms button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rooms .lbl { align-self: center; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55); margin: 0 2px 0 6px; }

.options { background: var(--card); border-left: 1px solid var(--line); padding: 28px 26px 30px; min-height: calc(100vh - 87px); }
.options h1 { font-size: 2rem; }
.options .lead { margin: 10px 0 6px; }
.group { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }
.group h2 { font: 600 .76rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices.two, .choices.swatches { grid-template-columns: repeat(2, 1fr); }
.choices button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 11px;
  cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 1px; align-content: start; transition: border-color .12s; }
.choices button:hover { border-color: #a9b3ad; }
.choices button.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #f1f6f3; }
.choices b { font-size: .93rem; line-height: 1.25; }
.choices span { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.swatches button { grid-template-columns: 30px 1fr; column-gap: 10px; align-items: center; }
.swatches i { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }

.total { position: sticky; bottom: 0; margin: 20px -26px -30px; padding: 16px 26px 20px; background: var(--card);
  border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: end; }
.total-label { margin: 0; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.total-sum { margin: 0; font-size: .88rem; line-height: 1.35; }
.total-price { margin: 0; font: 600 1.9rem var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-note { grid-column: 1 / -1; margin: 2px 0 8px; font-size: .8rem; color: var(--muted); }
.total .btn { grid-column: 1 / -1; text-align: center; }
.link { grid-column: 1 / -1; border: 0; background: none; color: var(--accent); font: inherit; font-size: .88rem;
  cursor: pointer; text-decoration: underline; padding: 6px 0 0; }

.contact textarea { font: inherit; font-size: .92rem; padding: 12px 14px; border-radius: 10px; border: 1px dashed #47504b;
  background: transparent; color: #c9d0cb; resize: none; }
section.gallery { padding-bottom: 0; }

@media (max-width: 980px) {
  .cfg { grid-template-columns: 1fr; }
  .viewer { height: 62vh; height: 62svh; min-height: 320px; z-index: 5; }
  .options { border-left: 0; min-height: 0; padding: 22px 16px 24px; }
  .total { margin: 18px -16px -24px; padding: 14px 16px 18px; }
  .hint { font-size: .75rem; }
  .rooms button { padding: 7px 12px; font-size: .82rem; }
  /* one swipeable row of rooms, so the chips do not cover the house */
  .rooms { left: 0; right: 0; padding: 0 14px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .rooms::-webkit-scrollbar { display: none; }
  .rooms > * { flex: none; white-space: nowrap; }
  /* one-row sticky total on phones (price left, button right) so the 3D view keeps the screen */
  .total { grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 0 12px; padding: 8px 16px 10px; align-items: center; }
  .total > div { grid-column: 1; grid-row: 1; }
  .total-label::after { content: " · excl. VAT"; }
  :lang(ro) .total-label::after { content: " · fără TVA"; }
  .total-price { grid-column: 1; grid-row: 2; font-size: 1.35rem; line-height: 1.15; }
  .total-sum, .total-note, .total .link { display: none; }
  .total .btn { grid-column: 2; grid-row: 1 / 3; padding: 10px 16px; font-size: .9rem; white-space: nowrap; }
}
@media (max-width: 420px) {
  .choices { grid-template-columns: 1fr 1fr; }
  .view-top .seg button { padding: 6px 11px; font-size: .82rem; }
  .hint { display: none; }
  .total-label { white-space: nowrap; font-size: .66rem; letter-spacing: .05em; }
}
/* label, price and button of the sticky total on one row at 320px */
@media (max-width: 350px) {
  .total { gap: 0 8px; padding-left: 12px; padding-right: 12px; }
  .total .btn { padding: 10px 11px; font-size: .84rem; }
}
