/* ═══════════════════════════════════════════════════════════
   Grönfeld Planter Configurator — Shared Stylesheet
   Loaded by all three modes. Mode-specific CSS stays inline.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700&display=swap');

/* ── Design tokens ── */
:root {
  --accent:       #3A5C32;
  --accent-mid:   #4A6741;
  --accent-light: #7BAF6F;
  --accent-soft:  #E8EEE6;
  --accent-faint: #F4F8F3;
  --bg:           #F8F8F6;
  --surface:      #FFFFFF;
  --border:       #E4E4E0;
  --text:         #111111;
  --text-muted:   #888886;
  --danger:       #C0392B;
  --warn:         #B8860B;
  --shadow:       0 1px 2px rgba(0,0,0,0.06), 0 3px 12px rgba(0,0,0,0.05);
  --radius:       4px;
  --font:         'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Legacy aliases so mode2/mode3 work without changes */
  --green:        #3A5C32;
  --green-mid:    #4A6741;
  --green-light:  #7BAF6F;
  --green-soft:   #E8EEE6;
  --green-faint:  #F4F8F3;
  --muted:        #888886;
  --r:            4px;
  --font-sans:    'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  height: 54px;
}
.brand-logo { height: 28px; width: auto; display: block; }
.brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.brand-mark {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.brand-sep { color: var(--border); font-weight: 300; }
.brand-sub { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.header-tag {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-left: auto;
  letter-spacing: 0.02em;
  transition: color 0.12s;
}
.back-link:hover { color: var(--text); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  flex-shrink: 0;
}

/* ── Shared button styles ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: white;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-primary:hover { background: var(--accent-mid); border-color: var(--accent-mid); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--accent-soft);
  border: 1.5px solid #C5D9C0;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.btn-secondary:hover { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Print modal (shared across all modes) ── */
#printOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.55);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#printOverlay.show { display: flex; }
.print-modal {
  background: white;
  border-radius: 8px;
  max-width: 740px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.pm-head {
  padding: 20px 28px 16px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pm-title { font-size: 15px; font-weight: 700; }
.pm-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #999; line-height: 1; }
.pm-close:hover { color: #333; }
.pm-actions {
  padding: 16px 28px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.pa-btn { padding: 9px 20px; border-radius: var(--radius); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; border: 1.5px solid; transition: all 0.12s; }
.pa-print { background: var(--accent); border-color: var(--accent); color: white; }
.pa-print:hover { background: var(--accent-mid); border-color: var(--accent-mid); }
.pa-cancel { background: white; border-color: #ccc; color: #555; }
.pa-cancel:hover { border-color: #999; }

/* ── Print document styles ── */
.pdoc { padding: 32px 36px; font-family: 'Helvetica Neue', Arial, sans-serif; }
.pdoc-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 18px; border-bottom: 2px solid #2B4A22; margin-bottom: 22px; }
.pdoc-brand { font-size: 20px; font-weight: 800; letter-spacing: 0.14em; color: #2B4A22; }
.pdoc-brand-logo { height: 28px; width: auto; display: block; margin-bottom: 4px; }
.pdoc-doctitle { font-size: 12px; color: #777; margin-top: 3px; }
.pdoc-date { font-size: 11px; color: #aaa; text-align: right; }
.pdoc-section { font-size: 10px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase; color: #999; margin-bottom: 10px; padding-bottom: 4px; border-bottom: 1px solid #eee; }
.pdoc-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.pdoc-spec { border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px 14px; }
.pdoc-spec-val { font-size: 22px; font-weight: 700; color: #2B4A22; }
.pdoc-spec-lbl { font-size: 11px; color: #999; margin-top: 2px; }
.pdoc-mods { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-bottom: 5px; }
.pdoc-mod { background: #EAF0E8; border: 1px solid #C5D9C0; border-radius: 3px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #3D5C35; }
.pdoc-mod-plus { font-size: 12px; color: #bbb; }
.pdoc-asm-note { font-size: 11px; color: #777; margin-bottom: 18px; }
.pdoc-iso { display: flex; justify-content: center; margin: 16px 0 20px; background: #fafafa; border: 1px solid #eee; border-radius: 6px; padding: 16px; }
.pdoc-iso svg { max-width: 100%; height: auto; }
.pdoc-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 18px; }
.pdoc-table th { text-align: left; padding: 8px 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #999; border-bottom: 1.5px solid #333; }
.pdoc-table th.r { text-align: right; }
.pdoc-table td { padding: 8px 10px; border-bottom: 1px solid #eee; vertical-align: top; }
.pdoc-table td.r { text-align: right; font-variant-numeric: tabular-nums; }
.pdoc-sku { font-family: Menlo, monospace; font-size: 10px; color: #aaa; }
.pdoc-iname { font-size: 11px; color: #444; }
.pdoc-total td { border-top: 2px solid #333; border-bottom: none; font-weight: 700; padding-top: 10px; }
.pdoc-total-val { font-size: 15px; color: #2B4A22; }
.pdoc-footer { border-top: 1px solid #eee; padding-top: 14px; display: flex; justify-content: space-between; font-size: 10px; color: #bbb; margin-top: 4px; }

/* ── @media print ── */
@media print {
  body * { visibility: hidden; }
  #printContent, #printContent * { visibility: visible; }
  #printContent { position: fixed; inset: 0; background: white; }
  .pdoc { padding: 18mm 22mm; }
  .pm-head, .pm-actions { display: none; }
}