:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #1c2430;
  --dim: #5a6b7d;
  --line: #e2e8f0;
  --accent: #1d4ed8;
  --accent-ink: #ffffff;
  --pass: #0a7a40;
  --fail: #b91c1c;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

header {
  text-align: center;
  padding: 40px 16px 8px;
}
header h1 { margin: 0 0 6px; font-size: 2rem; }
.sub { color: var(--dim); margin: 0; }

main {
  max-width: 980px;
  margin: 24px auto 60px;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.hidden { display: none !important; }

/* Dropzone */
#dropzone {
  border: 2px dashed #94a3b8;
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
#dropzone:hover, #dropzone.dragover {
  border-color: var(--accent);
  background: #eff6ff;
}
.dz-icon { font-size: 2.2rem; margin-bottom: 8px; }
.hint { color: var(--dim); font-size: .88rem; }

/* Spinner */
#busy { text-align: center; }
.spinner {
  width: 42px; height: 42px;
  margin: 8px auto 14px;
  border: 4px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error { border-color: #fecaca; background: #fef2f2; }
.error h2 { margin-top: 0; }

/* Result layout */
.result-grid {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 20px;
}
@media (max-width: 760px) {
  .result-grid { grid-template-columns: 1fr; }
}

.preview-card h2, .checks-card h2 { margin: 0 0 14px; font-size: 1.15rem; }
.dim { color: var(--dim); font-weight: normal; font-size: .9rem; }

.photo-frame {
  position: relative;
  width: 248px;
  margin: 0 auto 10px;
  padding: 0 34px 26px 0;
}
.photo-frame img {
  width: 100%;
  aspect-ratio: 35 / 45;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .15);
  display: block;
}
.mm-label {
  position: absolute;
  color: var(--dim);
  font-size: .75rem;
}
.mm-w { bottom: 4px; left: 50%; transform: translateX(-50%); }
.mm-h { right: 0; top: 50%; transform: translateY(-50%) rotate(90deg); }

#overall-badge { text-align: center; margin: 10px 0 14px; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
}
.badge.pass { background: #dcfce7; color: var(--pass); }
.badge.fail { background: #fee2e2; color: var(--fail); }

.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}
.example-col {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .85rem;
}
.example-col h2 { margin: 0 0 8px; font-size: .85rem; }
.example-col ul { margin: 0; padding-left: 18px; }
.example-col li { margin-bottom: 4px; color: var(--dim); }
.example-good { background: #f0fdf4; }
.example-good h2 { color: var(--pass); }
.example-bad { background: #fef2f2; }
.example-bad h2 { color: var(--fail); }
@media (max-width: 480px) {
  .example-grid { grid-template-columns: 1fr; }
}

/* Output-keuzes: drie duidelijke opties (digitaal / zelf printen / bezorgen) */
.output-choices { margin: 6px 0 4px; }
.choices-title { font-size: 1rem; margin: 4px 0 12px; }
.output-option {
  position: relative;
  display: flex;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}
.output-option.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  background: #f5f9ff;
  margin-top: 18px;
}
.oo-ribbon {
  position: absolute;
  top: -11px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.oo-icon { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; }
.oo-main { flex: 1; min-width: 0; }
.oo-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.oo-title { font-weight: 700; font-size: .98rem; }
.oo-tag {
  margin-left: auto;
  font-weight: 700;
  font-size: .82rem;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.oo-tag.free { background: #dcfce7; color: var(--pass); }
.oo-tag.price { background: var(--accent); color: var(--accent-ink, #fff); display: inline-flex; align-items: baseline; gap: 6px; }
.oo-was { opacity: .7; font-size: .78rem; font-weight: 600; text-decoration: line-through; }
.oo-desc { color: var(--dim); font-size: .85rem; margin: 0 0 12px; }
.oo-btn { width: 100%; }
.oo-btn-row { display: flex; gap: 10px; }
.oo-btn-row .oo-btn { width: auto; flex: 1; }
@media (max-width: 480px) {
  .oo-btn-row { flex-direction: column; }
}

.print-form {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 16px;
  margin: 4px 0 14px;
}
.print-form legend {
  padding: 0 6px;
  font-weight: 600;
  font-size: .95rem;
}
.order-price { font-weight: 700; }
.discount-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--fail);
  font-size: .75rem;
  font-weight: 700;
}
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 2px;
  cursor: pointer;
  font-size: .92rem;
}
.radio-row input { margin-top: 3px; flex: 0 0 auto; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: .92rem; }
.checkbox-row input { margin-top: 3px; flex: 0 0 auto; }
.print-form .actions { margin: 10px 0 6px; }

.wizard-step {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.wizard-step select {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: .95rem;
  background: #fff;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.country-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .country-options { grid-template-columns: 1fr; }
}
.country-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.country-option:hover { border-color: #b7c3d6; }
.country-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.country-option .co-flag { font-size: 1.7rem; line-height: 1; }
.country-option .co-body { display: flex; flex-direction: column; gap: 2px; }
.country-option .co-body strong { font-size: .98rem; }
.country-option .co-sub { color: var(--dim); font-size: .78rem; }
.country-option.selected {
  border-color: var(--accent);
  background: #eff6ff;
  box-shadow: 0 0 0 1px var(--accent);
}
.wizard-step h2 { margin: 4px 0 4px; font-size: 1.3rem; }
.wizard-step .checkbox-row, .wizard-step .hint { text-align: left; }
.wizard-step-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.wizard-next {
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  font-size: 1rem;
}
.wizard-back-row { margin: -4px 0 14px; }
.wizard-back-row .btn { padding: 4px 6px; font-size: .88rem; }

.actions { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }

.btn {
  display: inline-block;
  text-align: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #eef2f7; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.subtle { border: none; background: none; color: var(--dim); font-weight: normal; }

/* Checks: gegroepeerd per categorie, individuele checks ingeklapt */
#checks { display: flex; flex-direction: column; gap: 8px; }
.check-category {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.check-category summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.check-category summary::-webkit-details-marker { display: none; }
.category-title { flex: 1; }
.category-count { font-weight: 400; font-size: .8rem; color: var(--dim); }
.check-category.pass summary .check-icon { color: var(--pass); }
.check-category.fail summary .check-icon { color: var(--fail); }
.check-category[open] summary { border-bottom: 1px solid var(--line); }
.check-category ul { list-style: none; margin: 0; padding: 4px 14px; }
.check-category li {
  display: flex;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.check-category li:last-child { border-bottom: none; }
.check-icon { flex: 0 0 auto; }
.check-body strong { font-weight: 600; }
.check-detail { color: var(--dim); font-size: .85rem; display: block; }
li.pass .check-icon { color: var(--pass); }
li.fail .check-icon { color: var(--fail); }
.exception-note { color: var(--pass) !important; font-style: italic; }

.exception-box {
  display: block !important;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 2px 0 10px;
}
.exception-box .exception-intro {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.exception-box .radio-row { padding: 4px 2px; font-size: .85rem; }

details { margin-top: 14px; color: var(--dim); font-size: .88rem; }
details summary { cursor: pointer; }

.notice h3 { margin-top: 0; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice li { margin-bottom: 6px; }

footer {
  text-align: center;
  color: var(--dim);
  font-size: .8rem;
  padding: 20px 0 40px;
}
