/* =========================================================
   Intro Personeel — css/apps/wa-sollicitatie.css
   "Solliciteer via WhatsApp": de modal van de eigen flow, de mobiele
   actiebalk en de Recrubo-knop. Hoort bij js/apps/wa-sollicitatie.js.

   Overgenomen van de Florys-plugin florys-wa-sollicitatie v2.7.0
   (assets/wa-sollicitatie.css) en omgezet naar de tokens van css/site.css
   (met terugvalwaarden). De thema-reparaties van de WordPress-versie
   (.row-solliciteer, dubbele iconen, !important tegen het thema) zijn
   weggelaten; alleen de Recrubo-widget heeft nog !important nodig, want
   die zet zijn eigen inline stijlen.

   Het groen is het donkergroen van de WhatsApp-knop (--whatsapp in css/site.css),
   zoals de knop "Solliciteer via WhatsApp" (btn-lime).
   ========================================================= */

:root {
  /* Donkergroen zoals de WhatsApp-knop (oktober 2026; was lime, met witte tekst 1,9:1). */
  --fwa-green: var(--whatsapp, #008738);
  --fwa-green-dark: var(--whatsapp-hover, #007330);
  --fwa-green-deep: var(--whatsapp-hover, #007330);
  --fwa-ink: var(--fg-1, #111);
  --fwa-body: var(--neutral-700, #3F3F3F);
  --fwa-muted: var(--fg-3, #6B6B6B);
  --fwa-line: var(--neutral-200, #E8E8E8);
  --fwa-surface: var(--neutral-50, #FAFAFA);
  --fwa-rand: var(--border-veld, #8C8C8C); /* rand van een invoerveld: 3:1 */
  --fwa-danger: var(--danger, #C8364A);
  --fwa-font: var(--font-sans, "Avenir", "Avenir Next", "Nunito", system-ui, sans-serif);
}

/* ---------- De modal ---------- */
.fwa-overlay {
  position: fixed; inset: 0; z-index: 1000; padding: 16px; box-sizing: border-box; overflow-y: auto;
  background: rgba(17,17,17,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; font-family: var(--fwa-font);
}
.fwa-overlay.is-open { display: flex; animation: fwa-fade .2s ease-out; }
body.fwa-noscroll { overflow: hidden; }
@keyframes fwa-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fwa-rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }

.fwa-modal {
  position: relative; width: 100%; max-width: 440px; margin: auto; box-sizing: border-box;
  padding: 32px 32px 28px; background: #fff; border-radius: var(--radius-xl, 20px);
  box-shadow: 0 24px 64px -16px rgba(17,17,17,.35);
  font-size: 16px; line-height: 1.45; color: var(--fwa-body); -webkit-font-smoothing: antialiased;
  animation: fwa-rise .36s var(--ease, cubic-bezier(.22,1,.36,1)) both;
}
@media (max-width: 420px) { .fwa-modal { padding: 24px 20px 22px; } }

.fwa-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--fwa-muted);
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .12s ease-out, color .12s ease-out;
}
.fwa-close:hover { background: var(--neutral-100, #F4F4F4); color: var(--fwa-ink); }

.fwa-head { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.fwa-badge {
  width: 44px; height: 44px; border-radius: 999px; background: var(--fwa-green);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px -8px rgba(0,135,56,.45);
}
.fwa-badge svg { width: 24px; height: 24px; fill: #fff; display: block; }
.fwa-modal h2 { margin: 0; font-family: var(--fwa-font); font-size: 24px; font-weight: 800; letter-spacing: normal; line-height: 1.15; color: var(--fwa-ink); }
.fwa-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--fwa-muted); text-wrap: pretty; }

/* Vacaturechip: bevestigt waar je op solliciteert */
.fwa-vac { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 12px 14px; box-sizing: border-box; background: var(--intro-lime-50, #F4F9DD); border-radius: 12px; }
.fwa-vac[hidden] { display: none; }
.fwa-vac-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--fwa-green); color: #fff; display: flex; align-items: center; justify-content: center; }
.fwa-vac-icon svg { width: 18px; height: 18px; display: block; }
.fwa-vac-text { min-width: 0; display: block; }
.fwa-vac-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--fwa-ink); }
.fwa-vac-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--fwa-muted); }

/* Velden */
.fwa-field { margin-bottom: 16px; }
.fwa-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--fwa-body); }
.fwa-field input {
  width: 100%; box-sizing: border-box; padding: 13px 14px; border: 1px solid var(--fwa-rand); border-radius: 10px;
  background: var(--fwa-surface); font: inherit; font-size: 16px; color: var(--fwa-ink);
  transition: border-color .15s ease-out, box-shadow .15s ease-out, background .15s ease-out;
}
.fwa-field input::placeholder { color: var(--fg-3, #6B6B6B); }
.fwa-field input:hover { border-color: var(--fg-2, #4A4A4A); }
.fwa-field input:focus { outline: none; background: #fff; border-color: var(--fwa-green); box-shadow: 0 0 0 3px rgba(0,135,56,.2); }
.fwa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 400px) { .fwa-row { grid-template-columns: 1fr; gap: 0; } }
.fwa-modal button:focus-visible, .fwa-modal a:focus-visible, .fwa-modal input[type=checkbox]:focus-visible { outline: 2px solid var(--fwa-ink); outline-offset: 2px; }

/* Groen vinkje zodra een veld klopt */
.fwa-wrap { display: block; position: relative; }
.fwa-wrap .fwa-valid {
  position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; color: var(--fwa-green-deep);
  opacity: 0; pointer-events: none; transform: translateY(-50%) scale(.6); transition: opacity .15s ease-out, transform .15s ease-out;
}
.fwa-wrap .fwa-valid svg { width: 100%; height: 100%; display: block; }
.fwa-wrap.is-valid .fwa-valid { opacity: 1; transform: translateY(-50%) scale(1); }
.fwa-wrap.is-valid input { padding-right: 42px; }

/* Telefoon met vaste landcode */
.fwa-telgroup {
  display: flex; align-items: stretch; overflow: hidden;
  border: 1px solid var(--fwa-rand); border-radius: 10px; background: var(--fwa-surface);
  transition: border-color .15s ease-out, box-shadow .15s ease-out, background .15s ease-out;
}
.fwa-telgroup:hover { border-color: var(--fg-2, #4A4A4A); }
.fwa-telgroup:focus-within { background: #fff; border-color: var(--fwa-green); box-shadow: 0 0 0 3px rgba(0,135,56,.2); }
.fwa-telgroup .fwa-prefix { display: flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 0 12px; border-right: 1px solid var(--fwa-line); font-size: 15px; font-weight: 600; color: var(--fwa-body); }
.fwa-telgroup.is-intl .fwa-prefix { display: none; }
.fwa-flag { display: inline-flex; flex-direction: column; width: 20px; height: 14px; border-radius: 2px; overflow: hidden; }
.fwa-flag i { flex: 1; display: block; }
.fwa-flag i:nth-child(1) { background: #AE1C28; }
.fwa-flag i:nth-child(2) { background: #fff; }
.fwa-flag i:nth-child(3) { background: #21468B; }
.fwa-telgroup input, .fwa-telgroup input:focus, .fwa-field .fwa-telgroup input.fwa-input-error { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.fwa-telgroup.has-error { border-color: var(--fwa-danger); background: #FDF4F5; }
.fwa-telgroup.has-error .fwa-prefix { border-right-color: #F3D5D9; }
.fwa-intl { padding: 6px 0 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; color: var(--fwa-muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fwa-intl:hover { color: var(--fwa-ink); }

.fwa-field input.fwa-input-error { border-color: var(--fwa-danger); background: #FDF4F5; }
.fwa-field input.fwa-input-error:focus { border-color: var(--fwa-danger); box-shadow: 0 0 0 3px rgba(200,54,74,.15); }
.fwa-err { display: block; margin-top: 6px; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--fwa-danger); }
.fwa-err:empty { margin-top: 0; }
.fwa-err-consent { margin-top: -6px; margin-bottom: 12px; }

/* Toestemming */
.fwa-consent {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; padding: 14px 16px; box-sizing: border-box; cursor: pointer;
  background: var(--fwa-surface); border: 1px solid var(--fwa-line); border-radius: 12px;
  font-size: 13.5px; line-height: 1.5; color: var(--fwa-body); transition: border-color .12s ease-out, background .12s ease-out;
}
.fwa-consent:hover { border-color: var(--neutral-300, #D4D4D4); background: #F7F7F7; }
.fwa-consent input[type=checkbox] {
  -webkit-appearance: none; appearance: none; margin: 1px 0 0; flex-shrink: 0; width: 20px; height: 20px;
  display: grid; place-content: center; background: #fff; border: 1.5px solid var(--fwa-rand); border-radius: 6px; cursor: pointer;
  transition: border-color .12s ease-out;
}
.fwa-consent input[type=checkbox]::after {
  content: ""; width: 11px; height: 6px; border: 2px solid var(--fwa-green-deep); border-top: 0; border-right: 0;
  opacity: 0; transform: rotate(-45deg) translate(1px,-1px) scale(.6); transition: opacity .12s ease-out, transform .12s ease-out;
}
.fwa-consent input[type=checkbox]:checked { border-color: var(--fwa-green); }
.fwa-consent input[type=checkbox]:checked::after { opacity: 1; transform: rotate(-45deg) translate(1px,-1px) scale(1); }
.fwa-consent input[type=checkbox].fwa-input-error { border-color: var(--fwa-danger); }
.fwa-privacy-link { color: var(--fwa-green-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.fwa-privacy-link:hover { color: var(--fwa-ink); }

.fwa-submit {
  width: 100%; padding: 15px 20px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; background: var(--whatsapp, #008738); color: #fff; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: normal;
  box-shadow: 0 8px 20px -8px rgba(0,135,56,.45); transition: background .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out;
}
.fwa-submit:hover { background: var(--whatsapp-hover, #007330); transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(0,135,56,.5); }
.fwa-submit:active { transform: scale(.98); }
.fwa-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.fwa-promises { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 0; padding: 0; }
.fwa-promises li {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  background: var(--fwa-surface); border: 1px solid var(--fwa-line); border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--fwa-body);
}
.fwa-promises li::before { content: ""; width: 9px; height: 5px; flex-shrink: 0; border: 2px solid var(--fwa-green-deep); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-2px); }

.fwa-msg { margin: 14px 0 0; font-size: 14px; line-height: 1.5; text-align: center; color: var(--fwa-body); }
.fwa-msg:empty { margin: 0; }
.fwa-msg-error { padding: 10px 12px; border-radius: 10px; background: #FDF4F5; color: var(--fwa-danger); }
.fwa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Bedankt */
.fwa-success { padding: 12px 4px 4px; text-align: center; }
.fwa-success[hidden], .fwa-body[hidden] { display: none; }
.fwa-success h2 { margin: 18px 0 10px; font-size: 26px; }
.fwa-success-msg { max-width: 320px; margin: 0 auto 26px; font-size: 15.5px; line-height: 1.55; color: var(--fwa-body); text-wrap: pretty; }
.fwa-check { display: flex; justify-content: center; margin-top: 8px; }
.fwa-check svg { display: block; }
.fwa-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: fwa-circle .5s ease-out forwards; }
.fwa-check path { stroke-dasharray: 48; stroke-dashoffset: 48; animation: fwa-check .35s .45s ease-out forwards; }
@keyframes fwa-circle { to { stroke-dashoffset: 0; } }
@keyframes fwa-check { to { stroke-dashoffset: 0; } }
.fwa-done {
  width: 100%; padding: 14px 20px; border: 1px solid var(--fwa-ink); border-radius: 999px; background: #fff; color: var(--fwa-ink);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: background .15s ease-out, color .15s ease-out;
}
.fwa-done:hover { background: var(--fwa-ink); color: #fff; }

/* ---------- Mobiele actiebalk ---------- */
.fwa-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: none; gap: 10px; box-sizing: border-box;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--fwa-line); box-shadow: 0 -8px 24px -14px rgba(17,17,17,.5);
  transform: translateY(110%); transition: transform .24s var(--ease, cubic-bezier(.22,1,.36,1)); font-family: var(--fwa-font);
}
.fwa-bar.is-visible { transform: none; }
.fwa-bar-wa, .fwa-bar-alt {
  flex: 1; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius-sm, 6px); font: inherit; font-size: 15px; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer;
}
.fwa-bar-wa { background: var(--whatsapp, #008738); color: #fff; }
.fwa-bar-wa:hover, .fwa-bar-wa:focus { background: var(--whatsapp-hover, #007330); color: #fff; }
.fwa-bar-wa svg { fill: currentColor; }
.fwa-bar-alt { background: var(--intro-orange-700, #C64F00); }
.fwa-bar-alt:hover, .fwa-bar-alt:focus { color: #fff; }
@media (max-width: 768px) {
  .fwa-bar { display: flex; }
  /* De chatknop van Kim schuift mee omhoog, anders staat hij achter de balk. */
  body.fwa-bar-on .kim-widget { bottom: 84px; }
}
body.fwa-noscroll .fwa-bar { display: none; }

/* ---------- De knop ---------- */
/* De knop krijgt de klassen van de site (btn btn-lime) plus .wa-knop; dezelfde
   knop voor de eigen flow en voor Recrubo. */
.wa-knop svg { fill: currentColor; }
.wa-knop.is-bezig { cursor: progress; opacity: .75; }
.wa-knop.is-bezig svg { animation: wa-puls 1s ease-in-out infinite; }
@keyframes wa-puls { 50% { opacity: .35; } }

/* Recrubo: de widget staat buiten beeld (zie openRecrubo in de JS); hun
   formulier zet de widget zelf in de body, dat blijft gewoon zichtbaar. */
.wa-recrubo-plek { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .fwa-overlay.is-open, .fwa-modal { animation: none; }
  .fwa-check circle, .fwa-check path { animation: none; stroke-dashoffset: 0; }
  .fwa-submit:hover { transform: none; }
  .fwa-bar { transition: none; }
  .wa-knop.is-bezig svg { animation: none; }
}
