/* Gedeelde schermonderdelen voor de portalen. Merkneutraal: gebruikt alleen de --merk-*
   variabelen uit huisstijl-tokens.css. Zet data-merk="hs" of data-merk="rt" op <body>. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-600.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-700.woff2") format("woff2"); }

[data-merk] {
  --rand: color-mix(in srgb, var(--merk-basis, #5A2D91) 16%, #fff);
  --zacht: color-mix(in srgb, var(--merk-tekst, #303030) 62%, #fff);
  --radius: 14px;
  --schaduw: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  --breed: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; line-height: 1.5; font-size: 16px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--merk-basis); }
:focus-visible { outline: 3px solid var(--merk-accent); outline-offset: 2px; border-radius: 4px; }
.stip { color: var(--merk-accent); }
.klein { font-size: .8rem; color: var(--zacht); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.verborgen { display: none !important; }
.skiplink { position: absolute; left: -9999px; }
.skiplink:focus { left: 16px; top: 8px; z-index: 10; background: #fff; padding: 8px 12px; }

/* Omgevingsbalk: altijd zichtbaar buiten productie */
.omgevingsbalk { background: var(--merk-accent); color: var(--merk-tekst); font-size: .8rem; font-weight: 600; text-align: center; padding: 4px 16px; }

/* Bovenbalk */
.topbalk { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 4px solid var(--merk-basis); background: #fff; }
.topbalk .logo { height: 40px; width: auto; }
.topbalk .titel { font-weight: 700; color: var(--merk-basis); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbalk .ruimte { flex: 1; }
.gebruiker { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gebruiker .gnaam { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.gezicht { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--merk-vlak); border: 2px solid var(--merk-basis); flex: none; display: grid; place-items: center; font-weight: 700; color: var(--merk-basis); }
/* De hele avatar in het rondje, niet bijgesneden. */
.gezicht { position: relative; }
.gezicht img { position: absolute; inset: 3px 0 2px; width: 100%; height: calc(100% - 5px); object-fit: contain; object-position: 50% 50%; }

/* Knoppen */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 2px solid var(--merk-basis); background: var(--merk-basis); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.knop.licht { background: #fff; color: var(--merk-basis); }
.knop.klein { min-height: 36px; padding: 6px 14px; font-size: .85rem; }

/* Pagina-opbouw */
.inhoud { max-width: var(--breed); margin: 0 auto; padding: 24px 16px 48px; }
.voet { border-top: 1px solid var(--rand); color: var(--zacht); font-size: .8rem; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; text-align: center; }

/* Infoblok (lila vlak) */
.infoblok { background: var(--merk-vlak); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.infoblok strong { color: var(--merk-basis); }

/* Tegels */
.tegels { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.tegel { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; box-shadow: var(--schaduw); color: inherit; text-decoration: none; min-height: 168px; }
.tegel .icoon { width: 44px; height: 44px; border-radius: 12px; background: var(--merk-vlak); color: var(--merk-basis); display: grid; place-items: center; }
.tegel .icoon svg { width: 24px; height: 24px; }
.tegel h3 { margin: 4px 0 0; color: var(--merk-basis); }
.tegel p { margin: 0; font-size: .9rem; color: var(--zacht); }
.tegel .label { align-self: flex-start; margin-top: auto; font-size: .72rem; font-weight: 600; background: var(--merk-vlak); color: var(--merk-basis); padding: 2px 10px; border-radius: 999px; }
a.tegel:hover { border-color: var(--merk-basis); }
.tegel[aria-disabled="true"] { cursor: default; }

/* Avatarkiezer (inlogscherm) */
.inlog { min-height: 100vh; display: flex; flex-direction: column; }
.inlog main { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 16px 48px; }
.inlog .logo { height: 64px; width: auto; margin-bottom: 24px; }
.inlog .uitleg { color: var(--zacht); max-width: 520px; }
.avatars { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 12px; width: 100%; max-width: 860px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.avatars a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px 12px; border-radius: var(--radius); border: 2px solid transparent; text-decoration: none; color: inherit; background: #fff; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.avatars a:hover, .avatars a:focus-visible { border-color: var(--merk-basis); background: var(--merk-vlak); transform: translateY(-3px); }
.avatars img { height: 210px; width: auto; object-fit: contain; }
.avatars .vnaam { font-weight: 700; color: var(--merk-basis); font-size: 1.05rem; }
.avatars .functie { font-size: .78rem; color: var(--zacht); min-height: 2.4em; }
@media (max-width: 520px) {
  .avatars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .avatars img { height: 150px; }
  .topbalk .gnaam { display: none; }
  .topbalk .logo { height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .avatars a { transition: none; } .avatars a:hover { transform: none; } }

/* Laden en melding */
.laden { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 64px 16px; color: var(--zacht); }
.melding { max-width: 520px; margin: 0 auto; padding: 64px 16px; }

/* Formulieren */
.velden { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin: 12px 0; }
.veld { display: grid; gap: 4px; min-width: 0; }
.veld label { font-weight: 600; font-size: .85rem; }
input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  font: inherit; font-size: .95rem; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--rand); border-radius: 10px; background: #fff; color: var(--merk-tekst);
}
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--merk-accent); outline-offset: 1px; border-color: var(--merk-basis); }
.knop:disabled { opacity: .45; cursor: not-allowed; }
.knoppen { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; margin: 12px 0; }
.actie { display: grid; gap: 4px; justify-items: start; }
.foutmelding { margin: 0; font-size: .85rem; font-weight: 600; color: var(--merk-basis); }
.foutmelding:empty { display: none; }
.label { font-size: .72rem; font-weight: 600; background: var(--merk-vlak); color: var(--merk-basis); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.conceptlabel { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--merk-accent); color: var(--merk-tekst); padding: 2px 8px; border-radius: 999px; }
details summary { cursor: pointer; font-size: .85rem; color: var(--merk-basis); font-weight: 600; }

/* Gedeelde lijst- en keuzeonderdelen */
.pil { background: var(--merk-vlak); color: var(--merk-basis); border-radius: 999px; padding: 1px 10px; font-weight: 600; }
.rij { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; }
.rij h3 { margin: 0; }
.krachten { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin: 12px 0; }
.kracht-blok { border: 1px solid var(--rand); border-radius: 10px; padding: 8px 12px; margin: 0; min-width: 0; }
.kracht-blok legend { font-size: .72rem; font-weight: 700; letter-spacing: .1em; padding: 0 4px; }
.comp-keuze { padding: 4px 0; border-top: 1px solid var(--rand); }
.comp-keuze:first-of-type { border-top: 0; }
.comp-keuze label { display: flex; gap: 8px; align-items: center; font-size: .9rem; min-height: 32px; cursor: pointer; }
.comp-keuze input { width: 18px; height: 18px; accent-color: var(--merk-basis); }
.comp-keuze details { margin-left: 26px; }
/* Uitleg per competentie als pop-up: bij aanwijzen met de muis, of zodra het vakje focus heeft (toetsenbord, telefoon). */
.comp-keuze { position: relative; }
.comp-uitleg { display: none; position: absolute; z-index: 20; left: 26px; top: calc(100% - 2px); width: min(340px, calc(100vw - 48px)); padding: 12px 14px; border: 1px solid var(--rand); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgb(0 0 0 / 14%); font-size: .82rem; line-height: 1.45; }
.comp-uitleg strong { display: block; margin-bottom: 4px; font-size: .85rem; }
.comp-uitleg p { margin: 0 0 6px; }
.comp-uitleg ul { margin: 0; padding-left: 18px; }
.comp-keuze:hover .comp-uitleg, .comp-keuze:focus-within .comp-uitleg { display: block; }
.comp-keuze:hover { z-index: 21; }
