/* Room visualizer — Waldart-native (tokens.css). */

.viz {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  font-family: var(--font);
  color: var(--text-primary);
}

.viz__head { text-align: center; max-width: 46rem; margin: 0 auto 2rem; }
.viz__eyebrow {
  display: inline-block; font-size: 0.75rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--brand); font-weight: 600; margin-bottom: 0.5rem;
}
.viz__title { font-weight: 600; font-size: var(--h-xl); line-height: 1.1; margin: 0 0 0.5rem; }
.viz__lead { font-size: 1rem; line-height: 1.55; color: var(--text-muted); margin: 0; }

.viz__grid {
  display: grid; grid-template-columns: 340px 1fr; gap: 2rem; align-items: start;
}

/* ---- Controls ---- */
.viz__controls {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); position: sticky; top: 1.5rem;
}
.viz__field { margin-bottom: 1.25rem; }
.viz__label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.6rem; }

.viz__design-row { display: flex; align-items: center; gap: 0.75rem; }
.viz__design-thumb {
  width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: var(--surface-tint); flex-shrink: 0;
}
.viz__select {
  flex: 1; font: inherit; font-size: 0.95rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--gray-300); border-radius: 8px; background: var(--surface); cursor: pointer;
}
.viz__select:focus { outline: 2px solid var(--green-300); border-color: var(--brand); }

.viz__drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 120px; padding: 1rem; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--gray-300); border-radius: var(--radius);
  background: var(--surface-tint); color: var(--text-muted); transition: border-color 0.15s, background 0.15s;
}
.viz__drop:hover { border-color: var(--brand); background: var(--green-50); }
.viz__drop-text { font-size: 0.9rem; }
.viz__room-preview { width: 100%; border-radius: 8px; display: block; }

.viz__sizes { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.viz__size {
  font: inherit; font-size: 0.85rem; cursor: pointer; padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-primary); transition: border-color 0.15s, background 0.15s;
}
.viz__size:hover { border-color: var(--brand-strong); }
.viz__size.is-selected { border-color: var(--brand); background: var(--green-50); box-shadow: 0 0 0 2px var(--green-200); }

.viz__btn {
  width: 100%; font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius-pill); padding: 0.8rem 1.5rem;
  background: var(--brand); color: #fff; transition: background 0.15s;
}
.viz__btn:hover { background: var(--green-600); }
.viz__btn[disabled] { background: var(--gray-200); color: var(--gray-400); cursor: not-allowed; }
.viz__btn--ghost {
  width: auto; background: var(--surface); border-color: var(--border); color: var(--text-primary);
  text-decoration: none; display: inline-block;
}
.viz__btn--ghost:hover { background: var(--surface-tint); border-color: var(--brand); }

.viz__hint { font-size: 0.78rem; color: var(--text-muted); text-align: center; margin: 0.75rem 0 0; }
.viz__error { color: var(--red-700); font-size: 0.85rem; text-align: center; margin-top: 0.6rem; min-height: 1em; }

/* ---- Stage ---- */
.viz__stage {
  position: relative; min-height: 420px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface-tint);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.viz__placeholder { color: var(--text-muted); font-size: 0.95rem; padding: 2rem; text-align: center; }
.viz__loading { text-align: center; color: var(--text-muted); padding: 2rem; }
.viz__loading p { font-size: 0.9rem; margin-top: 1rem; }
.viz__spinner {
  width: 42px; height: 42px; margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--green-200); border-top-color: var(--brand); animation: viz-spin 0.9s linear infinite;
}
@keyframes viz-spin { to { transform: rotate(360deg); } }

.viz__result { margin: 0; width: 100%; }
.viz__result img { width: 100%; display: block; }
.viz__result-actions { padding: 0.85rem; display: flex; justify-content: center; background: var(--surface); }

@media (max-width: 820px) {
  .viz__grid { grid-template-columns: 1fr; }
  .viz__controls { position: static; }
  .viz__stage { min-height: 320px; }
}
