:root {
  --ns-yellow: #ffc917;
  --ns-blue: #003082;
  --ns-blue-light: #0063d3;
  --border: #d6d6d6;
  --background: #f7f7f7;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--ns-yellow);
  color: #222;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: white;
}

.headerMenu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

main {
  max-width: 750px;
  margin: auto;
  padding: 2rem 1rem;
}

section {
  margin-top: 2rem;
}

h2 {
  text-align: center;
  background: #d9381e;
  color: white;
  padding: .8rem;
  font-size: .95rem;
  font-weight: 400;
}

/* ── FIELDSETS ── */
fieldset {
  border: none;
  background: white;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ns-blue);
  margin-bottom: 1rem;
}

section > fieldset > legend{
  padding: 5em 1em 0em 1em;
  font-size: 1.6rem;
}

form > fieldset > legend {
  padding: 5em 1em 0em 1em;
  font-size: 1.6rem;
}

/* ── VRAGEN ── */
.q {
  font-size: 1rem;
  margin-bottom: .3rem;
  font-weight: 500;
}


/* ── INPUTS ── */
input[type="text"],
input[type="number"],
input[type="date"] {
  width: 100%;
  padding: .6rem .7rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--ns-blue-light);
  box-shadow: 0 0 0 2px rgba(0, 99, 211, 0.2);
}

input:user-invalid {
  border-color: rgba(255, 0, 0, 0.7);
  background-color: rgba(244, 102, 102, 0.1);
}

input:user-valid {
  border-color: rgba(37, 159, 37, 0.7);
  background-color: rgba(120, 218, 117, 0.1);
}

.gegevensOverledene {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: .5rem;
}

/* ── RADIO BUTTONS ── */
input[type="radio"] {
  accent-color: var(--ns-blue);
}

.radio-inputs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  border-radius: 0.5rem;
  background-color: #eee;
  box-shadow: 0 0 0px 1px rgba(0, 0, 0, 0.06);
  padding: 0.25rem;
  width: 300px;
  margin-top: 1em;
  font-size: 14px;
}

.radio {
  flex: 1 1 auto;
  text-align: center;
}

.radio input {
  display: none;
}

.radio .name {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: none;
  padding: .5rem 0;
  color: var(--ns-blue);
  transition: all .15s ease-in-out;
}

.radio input:checked + .name {
  background-color: var(--ns-blue);
  color: #eee;
  font-weight: 500;
}

/* ── FOUTMELDINGEN (JS-variant via hidden attribuut) ── */
.veld-fout {
  color: rgba(255, 0, 0, 0.9);
  font-size: 0.875rem;
  margin-top: -.5rem;
  margin-bottom: .75rem;
}

/* CSS-foutmeldingen voor naam/bsn/notaris (werkt zonder JS) */
.error_naam,
.error_bsn,
.error_notaris {
  color: rgba(255, 0, 0, 0.9);
  display: none;
}

fieldset:has(input[name="achternaam"]:user-invalid, input[name="voorletters"]:user-invalid) .error_naam {
  display: block;
}

fieldset:has(input[name="bsn"]:user-invalid) .error_bsn {
  display: block;
}

fieldset:has(input[name="notaris"]:user-invalid) .error_notaris {
  display: block;
}

/* ── CONDITIONELE VELDEN — puur CSS, geen JS nodig ── */

/* Standaard verborgen */
.followUp,
.followUp2,
.followUpKids,
.followUpKindOverleden,
.followUpWill {
  display: none;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--ns-blue);
}

/* Huwelijk */
fieldset:has(#married_yes:checked) .followUp       { display: block; }
fieldset:has(#conditions_yes:checked) .followUp2   { display: block; }

/* Familie */
fieldset:has(#kids_yes:checked) .followUpKids                     { display: block; }
fieldset:has(#kindOverleden_yes:checked) .followUpKindOverleden   { display: block; }

/* Testament */
fieldset:has(#will_yes:checked) .followUpWill      { display: block; }

/* ── KNOPPEN ── */
.buttonSection {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

button {
  background: var(--ns-blue);
  color: white;
  border: none;
  padding: 1rem;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

button:hover {
  background: var(--ns-blue-light);
}

a {
  text-align: center;
  padding: .8rem;
  border: 2px solid var(--ns-blue);
  color: var(--ns-blue);
  text-decoration: none;
  background: white;
  display: block;
}

/* ── VERKRIJGER KAARTEN ── */
.verkrijger {
  position: relative;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.verkrijger .remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: #ef4444;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}

.verkrijger .remove-btn:hover {
  color: #b91c1c;
}

/* ── HINT BOX ── */
.hint {
  display: inline-block;
}

.hint summary {
  background: var(--ns-blue);
  color: white;
  border: none;
  padding: .4em .6em;
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50%;
  list-style: none; 
}

.hint summary::-webkit-details-marker {
  display: none;
}

.hint p {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 350px;
  height: 500px;
  background: white;
  padding: 1.5rem;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  border-radius: 15px 0 0 0;
  z-index: 1000;
}

@media (max-width: 768px) {
  .hint p {
    left: 0;
    width: 100%;
    border-radius: 15px 15px 0 0;
  }
}

