/* Interior-design wizard — layered on top of style.css (reuses its variables,
   .topbar, .dropzone, .spinner, .badge, .error, .gallery, .hint). */

.wiz {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

/* progress bar */
.wiz-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.wiz-steps span {
  flex: 1;
  min-width: 80px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
}
.wiz-steps span.active {
  color: var(--primary-text);
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

/* panels */
.wiz-panel { animation: fade 0.18s ease; }
.wiz-panel h2 { margin: 0 0 4px; font-size: 20px; }
.wiz-panel > .hint { margin: 0 0 16px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }

/* nav buttons */
.wiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
button.primary, a.primary {
  background: var(--primary);
  color: var(--primary-text);
  border: none;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button.primary:hover, a.primary:hover { background: var(--primary-hover); }
button.primary:disabled { opacity: 0.45; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
}
button.ghost:hover { border-color: var(--primary); }

/* tile grid (inline previews + modal) */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel-2);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: flex-end;
}
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile.tile-noimg { align-items: center; justify-content: center; }
.tile.tile-noimg .tile-cap { position: static; background: none; text-align: center; padding: 8px; }
.tile-cap {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  text-align: left;
}
.tile.selected { outline: 2px solid var(--primary); outline-offset: -2px; }
.tile:hover { border-color: var(--primary); }

/* editable prompt textareas */
.wiz-panel textarea, .wiz-panel select {
  width: 100%;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
}
.wiz-panel textarea:focus, .wiz-panel select:focus { outline: none; border-color: var(--primary); }

/* final prompt review */
.prompt-review { margin: 12px 0; }
.prompt-review summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.prompt-review pre {
  white-space: pre-wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 12px;
  color: var(--text);
  margin-top: 8px;
}

/* result */
.result-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.result-compare figure { margin: 0; }
.result-compare figcaption { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.result-compare img, .result-compare .gallery img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
}
.result-actions { display: flex; gap: 12px; margin-top: 14px; }
@media (max-width: 560px) { .result-compare { grid-template-columns: 1fr; } }

/* modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.modal-tabs { display: flex; gap: 4px; padding: 12px 18px 0; }
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.modal-search {
  margin: 12px 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 9px 12px;
  font-size: 14px;
}
.modal-search:focus { outline: none; border-color: var(--primary); }
.modal-grid { overflow-y: auto; padding: 0 18px; margin: 0; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
