/* Leadcapture-popup (REQ 404), gedeeld tussen de homepage en /contact/. Uitsluitend bestaande
   tokens uit pages.css (:root), geen nieuwe kleurwaarden (AGENTS.md regel 7). Deze site is
   uitsluitend Light Mode (issue 40, P0): geen OS/browser-donkerthemadetectie of andere
   themalogica hier. */

.amg-popup-overlay {
  position: fixed; inset: 0; z-index: 100;
  /* --text-primary-rgb (pages.css :root) is de bestaande, goedgekeurde donkere merktoken, alleen
     van een RGB-variant voorzien voor deze halfdoorzichtige overlay: geen nieuw bedachte kleur
     (AGENTS.md regel 6-9, Codex-bevinding op PR 52). */
  background: rgba(var(--text-primary-rgb), .55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 18px;
  overflow-y: auto;
}
.amg-popup-overlay[hidden] { display: none; }

body.amg-popup-open { overflow: hidden; }

.amg-popup {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Generiek, elders op de site al gebruikt schaduwpatroon (zie .hero-video video in
     src/index.html), geen zelfbedachte bruine schaduwtint. */
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  padding: 32px 28px 28px;
  width: 100%; max-width: 480px;
  margin: auto 0;
}
.amg-popup h2 {
  margin: 0 0 8px; font-size: 24px;
}
.amg-popup-intro {
  margin: 0 0 22px; font-size: 14.5px; color: var(--text-muted); max-width: none;
}

.amg-popup-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-secondary); cursor: pointer;
}
.amg-popup-close:hover { color: var(--text-primary); background: rgba(var(--accent-rgb), .1); }

.amg-popup-form { display: flex; flex-direction: column; gap: 14px; }
.amg-popup-field { display: flex; flex-direction: column; gap: 6px; }
.amg-popup-field label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.amg-popup-field input[type="text"],
.amg-popup-field input[type="tel"],
.amg-popup-field input[type="email"] {
  font: inherit; font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-base); color: var(--text-primary);
}
.amg-popup-field input:focus-visible {
  outline: none; box-shadow: var(--focus-ring); border-color: var(--accent);
}
.amg-popup-field input[aria-invalid="true"] {
  border-color: var(--error);
}
.amg-popup-error {
  font-size: 12.5px; color: var(--error); min-height: 1em;
}

.amg-popup-category-legend {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.amg-popup-category-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.amg-popup-category-option {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-base);
  font-size: 13.5px; color: var(--text-secondary); cursor: pointer;
}
.amg-popup-category-option input { margin: 0; }
.amg-popup-category-option:has(input:checked),
.amg-popup-category-option.is-selected {
  border-color: var(--accent); background: rgba(var(--accent-rgb), .14); color: var(--text-primary); font-weight: 600;
}
.amg-popup-category-option input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.amg-popup-dns-warning {
  font-size: 13px; color: var(--accent-text, var(--accent));
  background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .3);
  border-radius: var(--radius-md); padding: 10px 14px;
}
.amg-popup-dns-warning[hidden] { display: none; }

.amg-popup-actions { margin-top: 4px; }
.amg-popup-submit { width: 100%; justify-content: center; }
.amg-popup-submit:disabled { opacity: .7; cursor: wait; }

.amg-popup-confirmation {
  padding: 4px 0 0;
}
.amg-popup-confirmation[hidden] { display: none; }
.amg-popup-confirmation strong {
  display: block; font-family: var(--font-heading); font-size: 18px; color: var(--success); margin-bottom: 8px;
}
.amg-popup-confirmation p { margin: 0; max-width: none; }

@media (max-width: 480px) {
  .amg-popup { padding: 26px 20px 22px; }
  .amg-popup-category-group { flex-direction: column; align-items: stretch; }
}
