/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
/* --- MARK: variables
*/
:root {
  /* NS basiskleuren */
  --ns-geel: #ffc917;
  --ns-blauw: #003082;
  --ns-lichtblauw: #00308210;

  /* Functionele kleuren */
  --ns-groen-succes: #217c20;
  --ns-rood-fout: #d0021b;

  /* Neutrale tinten */
  --ns-wit: #ffffff;
  --ns-grijs-licht: #f2f2f2;
  --ns-grijs-licht-blauw: #d5dce8;
  --ns-grijs-midden: #999999;
  --ns-zwart: #333333;

  /* Knopkleuren */
  --knop-blauw: rgba(0, 101, 219, 1);
  --knop-blauw-donker: rgba(0, 77, 166, 1);
  --foutmelding-rood: rgb(211, 10, 10);

  /* Afgeronde hoeken */
  --radius-border: 4px;
  --radius-background-border: 10px;

  /* Tekstgroottes */
  --ns-font-size-xs: 12px;
  --ns-font-size-sm: 14px;
  --ns-font-size-base: 16px;
  --ns-font-size-md: 18px;
  --ns-font-size-lg: 24px;
  --ns-font-size-xl: 32px;
  --ns-font-size-xxl: 40px;

  /* Tekstgewichten */
  --ns-font-weight-regular: 400;
  --ns-font-weight-bold: 700;

  /* Info melding */
  --back-ground-info-melding: #fefce8;
  --border-left-info-melding: #fdc700;
  --text-info-melding: #733e0a;
}

/* ==========================================================================
   2. BASIS STYLING
   ========================================================================== */
/* --- MARK: basis styling  
*/
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  background-color: var(--ns-grijs-licht);
  color: var(--ns-zwart);
  line-height: 1.5;
}

/* ==========================================================================
   3. HEADER
   ========================================================================== */
/* --- MARK: Header  
*/
header .informatie-schoolproject {
  background-color: var(--foutmelding-rood);
  color: var(--ns-wit);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: var(--ns-font-size-xs);
  padding: 5px;
  font-weight: var(--ns-font-weight-bold);
}

header .intro {
  background-color: var(--ns-geel);
  padding: 40px 50px 200px 50px;
  color: var(--ns-blauw);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

header .intro h1 {
  font-size: var(--ns-font-size-xxl);
  margin: 0;
}

/* ==========================================================================
   4. FORMULIER LAYOUT
   ========================================================================== */
/* --- MARK: Form layout  
*/
main {
  padding: 0 20px;
  max-width: 900px;
  margin: 0 auto;
}

form {
  background-color: var(--ns-wit);
  position: relative;
  top: -150px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-radius: var(--radius-background-border);
  padding: 40px;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 40px 0;
}

/* ==========================================================================
   5. VELDBENAMING
   ========================================================================== */
/* --- MARK: Veldbenamingen  
*/
legend {
  color: var(--ns-blauw);
  font-size: var(--ns-font-size-xl);
  font-weight: var(--ns-font-weight-bold);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ns-geel);
  margin-bottom: 25px;
}

label {
  display: block;
  font-size: var(--ns-font-size-md);
  color: var(--ns-blauw);
  margin-bottom: 8px;
  margin-top: 20px;
}

h2 {
  color: var(--ns-blauw);
  font-weight: var(--ns-font-weight-regular);
  font-size: var(--ns-font-size-md);
}

/* ==========================================================================
   6. INVOERVELDEN
   ========================================================================== */
/* --- MARK: Invoervelden  
*/
.form-group {
  display: flex;
  flex-direction: column;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"] {
  height: 50px;
  padding: 0 40px 0 15px; /* rechts ruimte voor het icoontje */
  border-radius: var(--radius-border);
  border: 2px solid var(--ns-grijs-licht-blauw);
  font-size: var(--ns-font-size-base);
  color: var(--ns-zwart);
}

input[type="text"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--ns-blauw);
}

input::placeholder {
  font-size: var(--ns-font-size-sm);
  color: var(--ns-grijs-midden);
}

/* ==========================================================================
   7. PROGRESSIEVE ONTHULLING
   ========================================================================== */
/* --- MARK: Progessive  
*/
.conditional-content {
  display: none;
}

.gesloten-vragen:has(.trigger:checked) > .conditional-content {
  display: block;
}

.conditional-content:has(.trigger:checked) > .conditional-content {
  display: block;
}

/* Antwoordoptie box */
.answer-option {
  display: flex;
  align-items: center;
  border: 2px solid var(--ns-grijs-licht-blauw);
  border-radius: var(--radius-border);
  padding: 5px 15px;
  margin-bottom: 10px;
  cursor: pointer;
}

/* Hovereffect */
.answer-option:hover {
  background-color: var(--ns-lichtblauw);
}

/* Blauwe rand bij geselecteerde optie */
.answer-option:has(input:checked) {
  border-color: var(--ns-blauw);
  background-color: var(--ns-lichtblauw);
}

/* Keuzerondje styling */
.answer-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: 15px;
  accent-color: var(--ns-blauw);
}

/* Label vult de rest van de box */
.answer-option label {
  width: 100%;
  margin: 0;
  padding: 15px 0;
  cursor: pointer;
  font-weight: var(--ns-font-weight-regular);
}

/* ==========================================================================
   8. VERZENDKNOP
   ========================================================================== */
/* --- MARK: Submitknop 
*/

.submit-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background-color: var(--knop-blauw);
  color: var(--ns-wit);
  border: none;
  font-size: var(--ns-font-size-xs);
  border-radius: var(--radius-border);
  padding: 12px 24px;
  font-weight: var(--ns-font-weight-bold);
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2);
  transition:
    background-color 0.2s,
    transform 0.1s;
}

.submit-button:hover {
  background-color: var(--knop-blauw-donker);
}

.submit-button:active {
  transform: translateY(1px);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   9. VALIDATIE & FOUTMELDINGEN
   ========================================================================== */
/* --- MARK: Validatie
*/

.form-group p {
  gap: 10px;
  align-items: center;
  color: var(--ns-rood-fout);
  line-height: 0;
  margin: 10px 0;
}

.error-message {
  display: none;
}

/* Fout - rode border + kruisje + schudanimatie */
input:user-invalid {
  border-color: var(--ns-rood-fout);
  background: url("data:image/svg+xml,%3Csvg fill='%23d0021b' width='16' height='16' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.41,12l6.3-6.29a1,1,0,1,0-1.42-1.42L12,10.59,5.71,4.29A1,1,0,0,0,4.29,5.71L10.59,12l-6.3,6.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0L12,13.41l6.29,6.3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42Z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  animation: schud-horizontaal 0.4s ease-in-out 1;
}

input:user-invalid + .error-message {
  display: flex;
}

/* Goed - groene border + vinkje */
input:user-valid {
  border-color: var(--ns-groen-succes);
  background: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12.6111L8.92308 17.5L20 6.5' stroke='%23217c20' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 10px center;
}

@keyframes schud-horizontaal {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* ==========================================================================
   11. INTROPAGINA
   ========================================================================== */
.intro-text p {
  font-size: var(--ns-font-size-md);
}

.intro-text {
  background-color: var(--ns-wit);
  padding: 50px;
  position: relative;
  top: -150px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: var(--ns-blauw);
}

/* infomelding */
.info-melding {
  padding: 10px 20px;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 4px;
  border-left: 4px solid var(--border-left-info-melding);
  background-color: var(--back-ground-info-melding);
}

.info-melding h2 {
  color: var(--text-info-melding);
  font-weight: var(--ns-font-weight-bold);
}

.info-melding p {
  color: var(--text-info-melding);
}

/* test je validatie iban */
.bank-shortcuts {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bank-btn {
  padding: 8px 12px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.bank-btn:hover {
  background-color: #e0e0e0;
}

.bank-btn:active {
  background-color: #d0d0d0;
}

/* Tooltip protocolnummer */
.label-blue {
  color: var(--ns-blauw);
  font-weight: 600;
}

.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  cursor: pointer;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background-color: var(--ns-blauw);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
  user-select: none;
}

.tooltip-box {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--ns-blauw);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 400;
  width: 220px;
  line-height: 1.4;
  z-index: 10;
  pointer-events: none;
}

.tooltip-box::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ns-blauw);
}

.tooltip-wrapper:hover .tooltip-box,
.tooltip-wrapper:focus .tooltip-box,
.tooltip-wrapper.active .tooltip-box {
  display: block;
}

/* ==========================================================================
   12. RESPONSIVE - media queries
   ========================================================================== */

@media (max-width: 600px) {
  header .intro {
    padding: 20px 20px 160px 20px;
  }

  header .intro h1 {
    font-size: var(--ns-font-size-xl);
  }

  form {
    padding: 20px;
  }

  legend {
    font-size: var(--ns-font-size-lg);
  }

  .tooltip-box {
    left: 0;
    transform: none;
    width: 200px;
  }

  .submit-button {
    width: 100%;
    justify-content: center;
  }
}
