/* Huisstijl naar cura-mc.be: lichtblauw #98D0DE, donker blauwgrijs #253B48, grijs #54595F, Poppins */
@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/poppins-300.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }

:root {
  --cura: #98d0de;          /* merkkleur (knoppen, accenten) */
  --cura-tint: #e4f3f7;     /* zachte achtergrond */
  --cura-tint2: #f2f9fb;
  --cura-diep: #2f7487;     /* lichtblauw is te licht voor tekst: deze tint wel */
  --inkt: #253b48;          /* tekstkleur van de website */
  --grijs: #54595f;
  --grijs-licht: #7a7a7a;
  --lijn: #e3ecef;
  --achter: #fafcfd;
  --kaart: #ffffff;
  --agent: #fff6e5;
  --agent-lijn: #f1dcae;
  --fout: #b3261e;
  --rond: 16px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font: 400 15.5px/1.55 "Poppins", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color: var(--inkt); background: var(--achter);
  display: flex; flex-direction: column;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--cura); outline-offset: 2px; }
a { color: var(--cura-diep); }

/* knoppen zoals "Afspraak" op de website */
#verstuur, .loginkaart button {
  background: var(--cura); color: var(--inkt); border: 0; border-radius: 4px; font-weight: 500;
}
#verstuur:hover:not(:disabled), .loginkaart button:hover { background: #86c6d6; }

/* ---------- aanmelden ---------- */
body.login { align-items: center; justify-content: center; padding: 16px; background: var(--cura-tint2); }
.loginkaart { flex: 0 0 auto; display: block; background: var(--kaart); padding: 32px 28px; border-radius: var(--rond);
  width: 100%; max-width: 380px; box-shadow: 0 6px 28px rgba(37,59,72,.08); text-align: center; }
.loginkaart img { width: 190px; height: auto; display: block; margin: 0 auto 6px; }
.loginkaart h1 { margin: 0; font-weight: 300; font-size: 22px; color: var(--grijs); letter-spacing: .5px; }
.loginkaart .sub { margin: 2px 0 22px; color: var(--grijs-licht); font-size: 14px; }
.loginkaart form { text-align: left; }
.loginkaart label { display: block; margin: 12px 0 4px; font-weight: 500; font-size: 14px; color: var(--grijs); }
.loginkaart input { width: 100%; padding: 10px 12px; border: 1px solid var(--lijn); border-radius: 8px; background: var(--cura-tint2); }
.loginkaart input:focus { border-color: var(--cura); background: #fff; outline: none; }
.loginkaart button { margin-top: 22px; width: 100%; padding: 11px; }
.fout { color: var(--fout); }

/* ---------- balk bovenaan ---------- */
.balk { display: flex; align-items: center; gap: 12px; padding: 8px 18px; background: var(--kaart);
  border-bottom: 1px solid var(--lijn); padding-top: max(8px, env(safe-area-inset-top)); }
.merk { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.merk img { height: 38px; width: auto; display: block; }
.merk span { font-weight: 300; font-size: 18px; color: var(--grijs); border-left: 1px solid var(--lijn); padding-left: 10px; }
.balk nav { display: flex; gap: 4px; align-items: center; }
.balk form { margin: 0; }
.link { background: none; border: 0; color: var(--grijs); padding: 6px 10px; border-radius: 6px; position: relative; }
.link:hover { color: var(--inkt); }
.link.actief::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: var(--cura); }
.icoon { background: none; border: 0; color: var(--grijs); font-size: 20px; padding: 4px 8px; }

.kader { flex: 1; display: flex; min-height: 0; }

/* ---------- gesprekken links ---------- */
aside { width: 280px; background: var(--kaart); border-right: 1px solid var(--lijn); padding: 14px; overflow-y: auto; }
aside .hoofd { width: 100%; padding: 10px; border-radius: 4px; border: 0; background: var(--cura); color: var(--inkt); font-weight: 500; }
aside .hoofd:hover { background: #86c6d6; }
aside ul { list-style: none; padding: 0; margin: 14px 0 0; }
aside li { padding: 9px 10px 9px 12px; border-radius: 8px; cursor: pointer; margin-bottom: 2px; border-left: 3px solid transparent; }
aside li:hover { background: var(--cura-tint2); }
aside li.actief { background: var(--cura-tint); border-left-color: var(--cura); }
aside li .titel { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
aside li .tijd { font-size: 12px; color: var(--grijs-licht); }
aside li.ongelezen .titel { font-weight: 600; }
aside li.ongelezen .titel::before { content: "● "; color: #d99a1e; }

/* ---------- chat ---------- */
main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#gesprekbalk { display: flex; align-items: center; gap: 8px; padding: 8px 18px; border-bottom: 1px solid var(--lijn); background: var(--kaart); }
#gesprekTitel { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--grijs); }
#titelInvoer { flex: 1; padding: 4px 8px; border: 1px solid var(--cura); border-radius: 6px; }
.klein { background: none; border: 1px solid var(--lijn); border-radius: 6px; padding: 3px 10px; font-size: 13px; color: var(--grijs);
  white-space: nowrap; }
.klein:hover { color: var(--inkt); border-color: var(--cura); }
.klein.let-op { color: #fff; background: var(--fout); border-color: var(--fout); }
#berichten { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }

.bericht { max-width: min(680px, 88%); padding: 10px 15px; border-radius: var(--rond); background: var(--kaart);
  box-shadow: 0 1px 4px rgba(37,59,72,.07); overflow-wrap: anywhere; }
.bericht p { margin: 0 0 .5em; }
.bericht p:last-child, .bericht ul:last-child { margin-bottom: 0; }
.bericht ul { margin: .3em 0 .5em; padding-left: 1.2em; }
.bericht strong { font-weight: 600; }
.bericht.gebruiker { align-self: flex-end; background: var(--cura); color: var(--inkt); border-bottom-right-radius: 4px; }
.bericht.helper { align-self: flex-start; border-bottom-left-radius: 4px; }
.bericht.agent { align-self: flex-start; background: var(--agent); border: 1px solid var(--agent-lijn); box-shadow: none; }
.bericht.agent .van { font-size: 12px; font-weight: 600; color: #8a5a00; margin-bottom: 4px; }
.bericht.intern { align-self: center; background: var(--cura-tint); color: var(--cura-diep); font-size: 13.5px; padding: 5px 14px;
  box-shadow: none; border-radius: 999px; }
.bericht.fout { align-self: center; background: #fdecea; color: var(--fout); font-size: 14px; box-shadow: none; }
.bericht .bijl { display: block; font-size: 13.5px; margin-top: 6px; color: inherit; }
.bericht.welkom { align-self: flex-start; background: var(--cura-tint2); border: 1px solid var(--lijn); box-shadow: none; }

#denkt { padding: 0 18px 8px; color: var(--grijs-licht); font-size: 14px; }
#denkt span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: var(--cura);
  animation: puls 1.2s infinite ease-in-out; }
#denkt span:nth-child(2) { animation-delay: .2s; }
#denkt span:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes puls { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

#invoer { border-top: 1px solid var(--lijn); background: var(--kaart); padding: 10px 14px;
  padding-bottom: max(10px, env(safe-area-inset-bottom)); }
#invoer .rij { display: flex; gap: 8px; align-items: flex-end; }
#tekst { flex: 1; resize: none; border: 1px solid var(--lijn); border-radius: 10px; padding: 10px 12px; max-height: 180px;
  background: var(--cura-tint2); }
#tekst:focus { outline: none; border-color: var(--cura); background: #fff; }
#verstuur { padding: 10px 18px; }
.bijlageknop { cursor: pointer; padding-bottom: 8px; }
#chips { display: flex; flex-wrap: wrap; gap: 6px; }
#chips:not(:empty) { margin-bottom: 8px; }
.chip { background: var(--cura-tint); color: var(--inkt); border-radius: 999px; padding: 4px 10px; font-size: 13.5px;
  display: flex; gap: 6px; align-items: center; }
.chip.fout { background: #fdecea; color: var(--fout); }
.chip button { background: none; border: 0; color: inherit; padding: 0 2px; }

/* ---------- mijn taken ---------- */
#taken { flex: 1; overflow-y: auto; padding: 18px; }
#taken h2 { margin: 0; font-weight: 300; font-size: 26px; color: var(--cura-diep); }
.uitleg { color: var(--grijs-licht); margin-top: 4px; }
.taak { background: var(--kaart); border-radius: var(--rond); padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(37,59,72,.07); border-left: 4px solid var(--cura); }
.taak .kop { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.taak h3 { font-size: 15.5px; font-weight: 500; margin: 0; }
.taak .wat { margin: 6px 0; white-space: pre-wrap; }
.taak .meta { font-size: 13px; color: var(--grijs-licht); }
.taak .notitie { font-size: 14px; border-left: 3px solid var(--lijn); padding-left: 8px; margin-top: 6px; white-space: pre-wrap; }
.taak .notitie.agent { border-color: #e0b44c; }
.status { font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: var(--cura-tint); color: var(--cura-diep); }
.status.vraag { background: #fff0cc; color: #8a5a00; }
.status.klaar { background: #e3f4e5; color: #1e6b2a; }
.status.afgewezen { background: #eee; color: #555; }
.taak .naar { font-size: 14px; background: none; border: 0; color: var(--cura-diep); padding: 0; text-decoration: underline; }

@media (max-width: 760px) {
  aside { position: fixed; z-index: 5; top: 0; bottom: 0; left: 0; transform: translateX(-100%); transition: transform .2s;
    box-shadow: 4px 0 16px rgba(37,59,72,.15); padding-top: max(14px, env(safe-area-inset-top)); }
  aside.open { transform: none; }
  .bericht { max-width: 92%; }
  .merk img { height: 32px; }
  .merk span { display: none; }
  .balk { padding-left: 8px; padding-right: 8px; }
  #gesprekbalk { padding: 6px 10px; }
}
@media (min-width: 761px) { #knopMenu { display: none; } }
