/* ============================================================
   style.css — Opmaak AI Act Compliance Checker
   Lettertype: RO Sans (rijksoverheid.nl) — fallback: Calibri, Verdana
   ============================================================ */

@font-face {
  font-family: "RO Sans";
  src: url("../fonts/rijksoverheidsanstext-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RO Sans";
  src: url("../fonts/rijksoverheidsansheading-bold.ttf") format("truetype");
  font-weight: 600 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:           #f7f7f5;
  --surface:      #ffffff;
  --surface-2:    #f3f3f0;
  --border:       #ddddd4;
  --text:         #1a1a1a;
  --text-muted:   #666660;
  --accent:       #01689b;
  --accent-light: #d4ebf7;
  --accent-hover: #154273;
  --red:          #b91c1c;
  --red-light:    #fef2f2;
  --orange:       #e17000;
  --orange-light: #fce9cf;
  --blue:         #007bc7;
  --blue-light:   #e5f2fb;
  --green:        #16a34a;
  --green-light:  #dcfce7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── PAGINAOPBOUW ─────────────────────────────────────────── */
.site-header {
  background: var(--accent-hover);
  color: #fff;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 0;
}

.site-header .brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.site-header .tagline {
  font-size: 13px;
  opacity: 0.75;
  border-left: 1px solid rgba(255,255,255,0.35);
  padding-left: 16px;
  margin-left: 16px;
}

.app {
  max-width: 740px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── HEADER ──────────────────────────────────────────────── */
.header { margin-bottom: 36px; }

.header-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}

.header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 560px;
}

/* ── VOORTGANGSBALK ──────────────────────────────────────── */
.progress-wrap { margin-bottom: 40px; }

.progress-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.progress-step {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}

.progress-step.active { background: var(--accent); }
.progress-step.done   { background: var(--accent); opacity: 0.4; }

.progress-labels {
  display: flex;
  justify-content: space-between;
}

.progress-labels span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}

/* ── STAPPEN ─────────────────────────────────────────────── */
.step {
  display: none;
  animation: fadeIn 0.25s ease;
}

.step.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.step h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 28px;
}

/* ── FORMULIER ───────────────────────────────────────────── */
.field { margin-bottom: 22px; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: auto;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(1,104,155,0.15);
}

/* Visuele feedback na automatisch invullen */
.field-autofilled {
  border-color: var(--accent) !important;
  background: var(--accent-light) !important;
  transition: background 0.4s, border-color 0.4s;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── KVK-ZOEKBALK ────────────────────────────────────────── */
.kvk-search-wrap { position: relative; }

.kvk-input-row { position: relative; }

.kvk-input-row input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.kvk-input-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(1,104,155,0.15);
  border-radius: 4px 4px 0 0;
}

/* Dropdown */
.kvk-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 4px 4px;
  list-style: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.dd-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.dd-item:last-child { border-bottom: none; }
.dd-item:hover,
.dd-item.focused   { background: var(--accent-light); }

.dd-name {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.dd-detail {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.dd-loading,
.dd-msg {
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text-muted);
  list-style: none;
}

/* Bevestigingskaart na selectie */
.kvk-confirm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: 4px;
  margin-top: 2px;
}

.kvk-confirm-info { flex: 1; }

.kvk-confirm-info strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.kvk-confirm-info span {
  font-size: 13px;
  color: var(--text-muted);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  white-space: nowrap;
}

/* ── CATEGORIELABELS ─────────────────────────────────────── */
.cat-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}

.cat-label.mt { margin-top: 22px; }

/* ── CHECKBOX GRID ───────────────────────────────────────── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

@media (max-width: 520px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface);
}

.checkbox-item:hover  { border-color: var(--accent); }
.checkbox-item.checked {
  border-color: var(--accent);
  background: var(--accent-light);
}

.checkbox-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.checkbox-item .tool-info { flex: 1; }

.checkbox-item .tool-name {
  font-weight: 600;
  font-size: 14px;
  display: block;
  line-height: 1.3;
}

.checkbox-item .tool-cat {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── RADIO OPTIES ────────────────────────────────────────── */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 4px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface);
  font-size: 15px;
}

.radio-item:hover   { border-color: var(--accent); }
.radio-item.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.radio-item input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── KNOPPEN ─────────────────────────────────────────────── */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
}

.btn {
  padding: 11px 26px;
  border-radius: 4px;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
  line-height: 1;
}

.btn-primary           { background: var(--accent); color: #fff; }
.btn-primary:hover     { background: var(--accent-hover); }
.btn-secondary         { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover   { background: var(--surface-2); }
.btn:disabled          { opacity: 0.4; cursor: not-allowed; }

/* ── RESULTATENKAARTEN ───────────────────────────────────── */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 16px;
}

.result-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

/* ── RISICOLABELS ────────────────────────────────────────── */
.risk-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 3px;
}

.risk-high    { background: var(--red-light);    color: var(--red);    }
.risk-limited { background: var(--orange-light);  color: var(--orange); }
.risk-minimal { background: var(--accent-light);  color: var(--accent); }

/* ── SCORE RING ──────────────────────────────────────────── */
.score-ring {
  width: 120px;
  height: 120px;
  margin: 16px auto;
  position: relative;
}

.score-ring svg   { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .bg   { stroke: var(--border); }
.score-ring .fill { transition: stroke-dashoffset 1s ease; }

.score-number {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
}

.score-label {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── ACTIEPUNTEN ─────────────────────────────────────────── */
.action-item {
  padding: 13px 16px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.action-urgent    { background: var(--red-light);    border-left: 3px solid var(--red); }
.action-important { background: var(--orange-light); border-left: 3px solid var(--orange); }
.action-nice      { background: var(--blue-light);   border-left: 3px solid var(--blue); }

.action-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 6px;
}

.action-urgent    .action-label { color: var(--red); }
.action-important .action-label { color: var(--orange); }
.action-nice      .action-label { color: var(--blue); }

.art-badge {
  font-size: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 6px;
  margin-right: 6px;
  color: var(--text-muted);
}

/* ── TABELLEN ────────────────────────────────────────────── */
.tool-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tool-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 400px;
}

.tool-table th {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tool-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* ── INFO BOXES ──────────────────────────────────────────── */
.info-box {
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  margin: 14px 0;
}

.info-box.tip     { background: var(--accent-light); border-left: 3px solid var(--accent); }
.info-box.warning { background: var(--orange-light);  border-left: 3px solid var(--orange); }
.info-box.danger  { background: var(--red-light);     border-left: 3px solid var(--red); }
.info-box strong  { display: block; margin-bottom: 4px; font-weight: 700; }

/* ── BETAALBANNER ────────────────────────────────────────── */
.payment-notice {
  padding: 14px 16px;
  background: var(--orange-light);
  border: 1px solid var(--orange);
  border-radius: 4px;
  font-size: 14px;
  color: #5c3100;
  margin-top: 16px;
}

.payment-notice a {
  color: var(--accent);
  font-weight: 700;
  margin-left: 4px;
}

/* ── WATERMERK ───────────────────────────────────────────── */
#wmOverlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'460'%20height%3D'220'%3E%3Ctext%20x%3D'230'%20y%3D'110'%20text-anchor%3D'middle'%20dominant-baseline%3D'middle'%20transform%3D'rotate(-28%20230%20110)'%20font-size%3D'17'%20font-family%3D'Arial%2Csans-serif'%20fill%3D'rgba(1%2C104%2C155%2C0.10)'%20font-weight%3D'bold'%20letter-spacing%3D'2'%3EActCheck.nl%3C%2Ftext%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 460px 220px;
}

@media print {
  .no-print { display: none !important; }
  #wmOverlay { display: block !important; }
  .print-wm {
    display: block !important;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 72pt;
    font-weight: 900;
    color: rgba(200,0,0,0.13);
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
    font-family: "RO Sans", Calibri, Verdana, sans-serif;
    letter-spacing: 4px;
  }
}
.print-wm { display: none; }

#step3 {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.hidden { display: none !important; }

/* ── GATE SCHERM ─────────────────────────────────────────── */
.gate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 8px;
}

.gate-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.gate-intro {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

.req {
  color: var(--red);
  font-weight: 700;
}

.gate-error {
  background: var(--red-light);
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--red);
  margin-bottom: 4px;
}

.truth-item {
  background: var(--surface-2);
}

/* ── CATEGORIE VRAGEN (STAP 2) ───────────────────────────── */
.cat-section {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  background: var(--surface);
  overflow: hidden;
}

.cat-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 16px;
}

.cat-ql {
  flex: 1;
  min-width: 0;
}

.cat-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.cat-examples {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.cat-toggle-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.cat-btn {
  padding: 7px 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  transition: all 0.15s;
}

.cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cat-btn.active-yes {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 700;
}

.cat-btn.active-no {
  background: #fff0f0;
  color: var(--red);
  border-color: var(--red);
  font-weight: 700;
}

.cat-tools {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

@media (max-width: 520px) {
  .cat-question-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cat-toggle-btns  { width: 100%; }
  .cat-btn          { flex: 1; text-align: center; }
}

/* ── VRAAGKAARTEN STAP 3 ─────────────────────────────────── */
.q-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  background: var(--surface);
  overflow: hidden;
}


.q-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.q-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.q-ql  { flex: 1; }

.q-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}

.q-hint {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.q-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
}

.q-opt {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-align: center;
  line-height: 1.3;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
}

.q-opt input[type="radio"] { display: none; }

.q-opt:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.q-opt.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.q-domain-grid {
  padding: 12px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

@media (max-width: 520px) {
  .q-opts { flex-direction: column; }
  .q-opt  { min-width: unset; }
}

/* ── SECTOR KEUZE (STAP 3 VRAAG 4) ──────────────────────── */

.sector-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sector-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(1,104,155,0.15);
}

/* ── SECTOR PIL-LIJST ────────────────────────────────────── */
.q4-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px 0 6px;
}

.sector-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-family: "RO Sans", Calibri, Verdana, sans-serif;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.4;
}

.sector-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.sector-btn.active {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
  font-weight: 600;
}

/* ── VRAAGKAART VERSCHIJNANIMATIE ────────────────────────── */
@keyframes qReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.q-reveal { animation: qReveal 0.3s ease forwards; }

/* ── MOBIEL ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  .site-header {
    padding: 12px 16px;
  }
  .site-header .tagline {
    display: none;
  }
  .app {
    padding: 24px 16px 60px;
  }
  h1 {
    font-size: 24px;
  }
  .step h2 {
    font-size: 19px;
  }
  .gate-card {
    padding: 20px 16px;
  }
  .result-card {
    padding: 16px;
  }
  .btn {
    padding: 11px 18px;
    font-size: 14px;
  }
  .progress-labels span {
    font-size: 9px;
  }
}
