/* Roof visualizer page */
.viz-head { background: var(--ink); color: #fff; padding: 7.5rem 0 2.5rem; }
.viz-head h1 { font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; line-height: .95; }
.viz-head .lede { margin-top: 1rem; max-width: 42rem; color: #d8d8d8; font-size: 1.1rem; }

.viz-app { background: var(--stucco); padding: 2rem 0 4rem; }
.viz-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(20rem, 1fr); gap: 2rem; align-items: start; }

.viz-photos { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.viz-photo {
  position: relative; display: grid; gap: .3rem; padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer;
  font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted); text-align: left; overflow: hidden; width: 7.5rem;
}
.viz-photo img { width: 100%; height: 4.6rem; object-fit: cover; border-radius: 10px; display: block; }
.viz-photo span { padding: 0 .2rem .3rem; }
.viz-photo.is-active, .viz-photo:hover, .viz-photo:focus-within { border-color: var(--brand); color: var(--ink); }
.viz-upload { background: #fff; align-content: center; justify-items: center; min-height: 6.5rem; }
.viz-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.viz-upload-icon { font-family: var(--display); font-size: 2rem;  color: var(--brand); line-height: 1; }

.viz-stage-wrap { position: relative; border-radius: 18px 18px 0 0; overflow: hidden; background: #111; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
#stage { display: block; width: 100%; height: auto; }
.viz-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.viz-stage-wrap.is-editing .viz-overlay { cursor: crosshair; touch-action: none; }
.viz-tool--edit { display: none; }
.viz-stage-wrap.is-editing + .viz-toolbar .viz-tool--edit { display: inline-block; }
.viz-tool--done { background: var(--brand); }
.viz-hint { margin-top: .6rem; font-size: .9rem; color: var(--muted); }
.viz-privacy { margin-top: .6rem; color: var(--muted); }
.viz-fine { font-size: .78rem; color: var(--muted); }
.viz-slider input[type=number] { width: 6rem; font: inherit; padding: .3rem .5rem; border-radius: 8px; border: 1px solid var(--stucco-2); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.viz-swatch img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.viz-toolbar { display: flex; gap: .4rem; flex-wrap: wrap; padding: .6rem; background: var(--ink); border-radius: 0 0 18px 18px; }
.viz-tool {
  font: inherit; font-size: .85rem; font-weight: 600; padding: .5rem .8rem; border-radius: 999px; cursor: pointer;
  background: rgba(20,20,20,.85); color: #fff; border: 1px solid rgba(255,255,255,.25);
}
.viz-tool:hover, .viz-tool:focus-visible, .viz-tool[aria-pressed="true"] { background: var(--brand); outline: none; }
.viz-status { margin: .7rem 0 0; min-height: 1.2em; }
.viz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1rem; }
.viz-slider { display: grid; gap: .2rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; color: var(--muted); }
.viz-slider input { width: 9rem; accent-color: var(--brand); }

.viz-card { background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: 0 20px 50px rgba(0,0,0,.08); display: grid; gap: 1rem; }
.viz-card-title { font-size: 2rem; text-transform: none; }
.viz-note { font-size: .85rem; }
.viz-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.viz-filter { font: inherit; font-size: .82rem; font-weight: 600; padding: .4rem .8rem; border-radius: 999px; border: 1px solid var(--stucco-2); background: var(--stucco); cursor: pointer; }
.viz-filter.is-active, .viz-filter:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

.viz-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.viz-swatch { display: grid; gap: .3rem; padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; font: inherit; font-size: .75rem; font-weight: 600; color: var(--ink); text-align: left; }
.viz-swatch canvas { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; display: block; }
.viz-swatch span { padding: 0 .2rem .3rem; line-height: 1.2; }
.viz-swatch small { display: block; font-family: var(--mono); font-weight: 500; font-size: .65rem; color: var(--muted); }
.viz-swatch.is-active, .viz-swatch:hover, .viz-swatch:focus-visible { border-color: var(--brand); outline: none; }
.viz-swatch[hidden] { display: none; }

.viz-selected { background: var(--ink); color: #fff; border-radius: 14px; padding: 1rem 1.2rem; }
.viz-selected .spec { color: var(--brand-bright); }
.viz-selected-name { font-family: var(--display); font-size: 1.6rem;  }
.viz-selected-meta { font-size: .85rem; color: #ccc; }

.viz-send { display: grid; gap: .7rem; border-top: 1px solid var(--stucco-2); padding-top: 1rem; }
.viz-send h3 { font-size: 1.4rem; }
.viz-send label { display: grid; gap: .25rem; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.viz-send textarea { resize: vertical; }
.viz-send input, .viz-send textarea { font: inherit; font-size: 1rem; padding: .65rem .8rem; border-radius: 10px; border: 1px solid var(--stucco-2); background: var(--stucco); }
.viz-legal { margin-top: 1rem; color: var(--muted); }

[hidden] { display: none !important; }

@media (max-width: 1000px) {
  .viz-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .viz-photo { width: calc(50% - .3rem); }
  .viz-swatches { grid-template-columns: repeat(3, 1fr); }
}
