/* Customer viewer (spec §8). Mobile first: below 768px the plan and 3D view are tabs; from 768px, side by side. */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px;
}

.proposal {
  display: grid;
  gap: 16px;
}

.refusal {
  display: grid;
  gap: 8px;
}

/* The site root's short notice (§10) uses the viewer's styles. */
.notice {
  display: grid;
  gap: 8px;
}

.refusal-message {
  font-size: 16px;
  font-weight: 600;
}

.meta {
  color: var(--muted);
}

.title {
  margin-top: 4px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 8px;
}

/* Tabs use the option-button style. */
.tab {
  flex: 1;
  min-height: var(--touch);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  background: var(--card);
  font-weight: 500;
  cursor: pointer;
}

.tab[aria-selected="true"] {
  border-color: var(--sage);
  background: var(--sage-tint);
}

.views {
  display: grid;
  gap: 16px;
}

.views[data-tab="plan"] .view-3d,
.views[data-tab="3d"] .view-plan {
  display: none;
}

.view {
  padding: 12px;
  min-width: 0;
}

.view-title {
  display: none;
}

.plan-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
}

.scene {
  height: 60vh;
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--recessed);
}

.scene-canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
}

.scene-note {
  margin-top: 12px;
  color: var(--muted);
}

.view-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.swatch {
  width: 24px;
  height: 16px;
  border: 2px solid;
  border-radius: 4px;
}

/* As the plan draws them (§9.1): new is solid, staying is dashed. */
.swatch-new {
  border-color: #3a6e65;
  background: #cedcd8;
}

.swatch-staying {
  border-color: #5c706c;
  border-style: dashed;
  background: #e5e1dc;
}

.options {
  display: grid;
  gap: 16px;
  padding: 12px;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-group {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.option-group-legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--muted);
  font-weight: 500;
}

.not-shown {
  display: grid;
  gap: 8px;
}

.not-shown-title {
  font-size: 14px;
  font-weight: 600;
}

.not-shown-list {
  padding-left: 20px;
  color: var(--muted);
}

.footer {
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 768px) {
  .page {
    padding: 32px;
  }

  .title {
    font-size: 36px;
  }

  .tabs {
    display: none;
  }

  .views {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .views[data-tab] .view-plan,
  .views[data-tab] .view-3d {
    display: block;
  }

  .view,
  .options {
    padding: 24px;
  }

  .view-title {
    display: block;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
  }

  .scene {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}
