/* Floorplan Generator — page styling.
   Tokens, sticky nav (.hdr/.nav/.brand) and the .btn system come from marketing.css.
   This file styles only the generator-specific structure. */
@import url('colors_and_type.css');

/* ---- Slim amber test bar (replaces the old full-red banner) ---- */
.gen-testbar {
  background: var(--warning-soft);
  color: var(--warning);
  border-bottom: 1px solid var(--warning-line);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 7px 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Page shell ---- */
.gen-main { max-width: 1200px; margin: 0 auto; padding: 28px var(--gutter) 40px; }
.gen-intro { margin-bottom: 22px; }
.gen-intro h1 { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.025em; color: var(--ink); }
.gen-intro p { color: var(--ink-3); margin-top: 6px; max-width: 60ch; }

/* ---- Two-column layout (single column <=1024px) ---- */
.gen-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.gen-col { display: flex; flex-direction: column; gap: 20px; }

/* ---- Cards ---- */
.gen-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.gen-card h2 { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 14px; }

/* ---- Form fields ---- */
.gen-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.gen-field:last-child { margin-bottom: 0; }
.gen-field label { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.gen-input {
  font-family: var(--font-body); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 9px 11px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.gen-input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }

/* ---- Rooms (column headers once; one clean row per room) ---- */
.rooms-head { display: grid; grid-template-columns: 1fr 92px 92px 28px; gap: 8px; padding: 0 2px 6px; }
.rooms-head span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); }
.rooms-list { display: flex; flex-direction: column; gap: 8px; }
.room-row { display: grid; grid-template-columns: 1fr 92px 92px 28px; gap: 8px; align-items: center; }
.room-row input {
  font-family: var(--font-body); font-size: 13.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: 8px 10px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.room-row input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); }

/* Remove: subtle grey x, visible on row hover / keyboard focus only */
.btn-remove {
  background: none; border: none; color: var(--ink-4);
  font-size: 18px; line-height: 1; cursor: pointer;
  padding: 2px 4px; border-radius: var(--r-xs);
  opacity: 0; transition: opacity .12s, color .12s, background .12s;
}
.room-row:hover .btn-remove, .btn-remove:focus-visible { opacity: 1; }
.btn-remove:hover { color: var(--ink); background: var(--paper-sunk); }
.btn-remove:disabled { opacity: 0; cursor: default; }

/* + Add room: text style, blueprint blue, no heavy border */
.btn-add {
  background: none; border: none; color: var(--blue);
  font-family: var(--font-display); font-size: 13.5px; font-weight: 600;
  cursor: pointer; padding: 10px 2px 0;
}
.btn-add:hover { color: var(--blue-hover); text-decoration: underline; }
.btn-add:disabled { color: var(--ink-4); cursor: default; text-decoration: none; }
.room-count-hint { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); margin-top: 10px; }

/* ---- Actions / button hierarchy (Primary reuses .btn .btn-ink from marketing.css) ---- */
.gen-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn-outline-blue { background: transparent; color: var(--blue); border: 1px solid var(--blue-line); }
.btn-outline-blue:hover { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-hover); }
.btn-outline-blue:disabled { opacity: 0.45; cursor: default; }
.btn-text {
  background: none; border: none; color: var(--ink-3);
  font-family: var(--font-display); font-size: 13px; font-weight: 500;
  cursor: pointer; padding: 8px 6px;
}
.btn-text:hover { color: var(--ink); text-decoration: underline; }

/* ---- Error box ---- */
.error-box { display: none; background: #FBEAE6; border: 1px solid #E0B4A8; color: #8A3322; border-radius: var(--r-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 16px; }
.error-box.visible { display: block; }

/* ---- 2D / 3D tab bar ---- */
.canvas-tabs { display: flex; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.btn-sm { padding: 5px 14px; font-size: 12px; }

/* ---- Canvas card (white, shadow, blueprint grid) ---- */
.canvas-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.canvas-wrap {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--surface);
  min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 28px;
}
#plan-canvas { max-width: 100%; height: auto; display: block; }
.canvas-empty { font-family: var(--font-mono); font-size: 12px; color: var(--ink-4); text-align: center; max-width: 30ch; }

/* ---- Stats row (monospace, homepage stats-band style) ---- */
.gen-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-top: 20px; }
.gen-stat { background: var(--surface); padding: 16px 18px; }
.gen-stat .sl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-4); }
.gen-stat .sv { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); margin-top: 5px; line-height: 1; }

/* ---- Details: rooms table / JSON / files ---- */
.results { display: none; }
.results.visible { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }

.gen-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gen-table th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); border-bottom: 1px solid var(--line); padding: 6px 8px; }
.gen-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.gen-table tr:last-child td { border-bottom: none; }

.json-preview { background: var(--ink); color: #C9D7E0; border-radius: var(--r-sm); padding: 14px; font-family: var(--font-mono); font-size: 12px; overflow-x: auto; max-height: 320px; }

#files-section { display: none; }
#files-section.visible { display: block; }
.files-list { display: flex; flex-direction: column; gap: 7px; }
.file-entry { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.file-entry .ext { background: var(--blue); color: #fff; border-radius: var(--r-xs); padding: 2px 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; }

/* ---- Order section (app.js writes class="stat-value status-X"; keep those styled) ---- */
.mock-notice { background: var(--warning-soft); border: 1px solid var(--warning-line); color: var(--warning); border-radius: var(--r-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); }
.stat-value { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); margin-top: 4px; }
.status-pending_payment { color: var(--warning); }
.status-paid { color: #2E7D32; font-weight: 700; }
.status-failed { color: #C0392B; font-weight: 700; }

/* ---- Footer (same simplified footer as before) ---- */
.gen-footer { margin-top: 40px; padding: 26px var(--gutter); border-top: 1px solid var(--line); text-align: center; font-family: var(--font-display); font-size: 13px; color: var(--ink-3); }
.gen-footer a { color: var(--blue); text-decoration: none; }
.gen-footer a:hover { text-decoration: underline; }
.footer-concept-note { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .gen-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .gen-stats { grid-template-columns: repeat(2, 1fr); }
  .order-grid { grid-template-columns: 1fr; }
}

/* ---- NEN stats styling ---- */
#free-download-buttons { margin-top: 10px; }
.dl-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; text-decoration: none; }
.dl-btn[disabled], .dl-btn.dl-loading { opacity: 0.5; pointer-events: none; cursor: not-allowed; }
.dl-btn.dl-loading::after { content: '…'; }
#download-buttons .dl-btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; text-decoration: none; }
.nen-stats { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px; }
.nen-stat-primary { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.nen-label { font-family: var(--font-display); font-size: 12px; font-weight: 600; color: var(--text-2); }
.nen-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--ink); }
.nen-stat-row { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.nen-stat-disclaimer { font-size: 11px; color: var(--text-3); line-height: 1.4; margin-top: 8px; }

/* ---- Virtuele Staging sectie ---- */
.staging-section {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px;
}

.staging-upload {
  margin: 1rem 0;
}

.staging-controls {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.staging-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.staging-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .staging-preview {
    grid-template-columns: 1fr;
  }
}
