/* Nulmeting als chat: zwevende knop rechtsonder en het chatvenster.
   Zelfde opzet als de agent op marss.amsterdam, in de kleuren van CLARK.
   Staat los van home.css, zodat andere pagina's alleen dit bestand en js/nulmeting.js hoeven te laden. */

.nul-knop, .nul, .nul * { box-sizing: border-box; }
/* de bellen heten nul-bel: home.css heeft al een eigen .bel voor de LinkedIn-scène */
:where(.nul) button, :where(.nul) input, .nul-knop { font: inherit; color: inherit; border: 0; background: none; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.nul p { margin: 0; }

/* ---------- Zwevende knop ---------- */
.nul-knop {
  position: fixed; right: clamp(16px, 2.2vw, 40px); bottom: calc(clamp(24px, 2.4vw, 36px) + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px 0 4px;   /* zelfde maat als de knop in het menu */
  border-radius: 999px; background: var(--wit, #fff); color: var(--zwart, #0D0707);
  font-weight: 700; font-size: 18px; line-height: 1; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(13, 7, 7, .28), 0 0 0 1px rgba(13, 7, 7, .06);
  transition: opacity .4s, transform .6s cubic-bezier(.22, 1, .36, 1), background-color .3s, color .3s;
}
.nul-knop:hover { background: var(--zwart, #0D0707); color: var(--wit, #fff); transform: translateY(-3px); }
.nul-knop:focus-visible { outline: 2px solid var(--rood, #DC0000); outline-offset: 3px; }
.nul-knop.is-weg { opacity: 0; transform: translateY(160%); pointer-events: none; }
/* de foto is net zo hoog als de balk, met een smalle rand eromheen */
.nul-knop__mens { position: relative; flex: none; width: 40px; height: 40px; }
.nul-knop__mens img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.nul-knop__online { position: absolute; right: -2px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #3DDC84; border: 2px solid var(--wit, #fff); transition: border-color .3s; }
.nul-knop__online::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid #3DDC84; animation: nul-puls 2.4s ease-out infinite; }
.nul-knop:hover .nul-knop__online { border-color: var(--zwart, #0D0707); }
@keyframes nul-puls { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(2.3); opacity: 0; } }
.menu-open .nul-knop, .nul-open .nul-knop { opacity: 0; transform: translateY(160%); pointer-events: none; }
.nul-open .cursor { opacity: 0 !important; }

/* ---------- Venster ---------- */
.nul {
  position: fixed; inset: 0; z-index: 120;
  width: min(640px, calc(100vw - 32px)); height: min(800px, calc(100dvh - 48px));
  max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
  border-radius: 22px; overflow: hidden;
  background: var(--wit, #fff); color: var(--zwart, #0D0707);
  font-size: 16px; line-height: 1.5;
  box-shadow: 0 32px 80px rgba(13, 7, 7, .4);
  flex-direction: column;
  opacity: 0; transform: translateY(32px) scale(.92); transform-origin: 80% 90%;
  transition: opacity .35s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}
.nul[open] { display: flex; }
.nul.is-open { opacity: 1; transform: none; }
.nul::backdrop { background: rgba(13, 7, 7, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .4s, backdrop-filter .4s, -webkit-backdrop-filter .4s; }
.nul.is-open::backdrop { background: rgba(13, 7, 7, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

.nul__kop { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 18px; background: var(--zwart, #0D0707); color: var(--wit, #fff); }
.nul__avatars { display: flex; align-items: center; flex: none; }
.nul__avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #241616; flex: none; }
.nul__bol { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 0deg, #8F0000, #DC0000, #FFF2F2, #8F0000); filter: blur(1px); animation: nul-draai 6s linear infinite, nul-adem 3s ease-in-out infinite; }
.nul.is-denkt .nul__bol { animation-duration: 1.2s, .8s; }
@keyframes nul-draai { to { rotate: 1turn; } }
@keyframes nul-adem { 50% { scale: .82; } }
.nul__mens { width: 0; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--zwart, #0D0707); margin-left: -10px; opacity: 0; transform: scale(.3); transition: width .5s cubic-bezier(.22, 1, .36, 1), opacity .3s, transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.nul.is-samen .nul__mens { width: 44px; opacity: 1; transform: none; }
.nul__wie { flex: 1; min-width: 0; }
.nul__naam { font-weight: 700; font-size: 18px; line-height: 1.1; }
.nul__status { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: 13px; opacity: .72; }
.nul__online { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #3DDC84; }
.nul__sluit { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .1) !important; transition: background .3s; }
.nul__sluit:hover { background: rgba(255, 255, 255, .22) !important; }
.nul__sluit::before, .nul__sluit span { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; margin: -.75px 0 0 -8px; background: currentColor; rotate: 45deg; }
.nul__sluit span { rotate: -45deg; }

.nul__gesprek { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px; padding: 20px 18px; background: var(--zacht, #F7F0E9); }
.nul-bel { max-width: min(85%, 460px); padding: 12px 16px; border-radius: 20px; font-size: 15.5px; line-height: 1.5; animation: nul-bel-in .5s cubic-bezier(.22, 1, .36, 1) both; }
.nul-bel--agent { align-self: flex-start; background: var(--wit, #fff); border-bottom-left-radius: 6px; }
.nul-bel--jij { align-self: flex-end; background: var(--zwart, #0D0707); color: var(--wit, #fff); border-bottom-right-radius: 6px; overflow-wrap: anywhere; }
.nul-bel--typt { display: flex; gap: 5px; padding: 16px 18px; }
.nul-bel--typt i { width: 6px; height: 6px; border-radius: 50%; background: var(--grijs, #705C5C); opacity: .6; animation: nul-stip 1s ease-in-out infinite; }
.nul-bel--typt i:nth-child(2) { animation-delay: .15s; }
.nul-bel--typt i:nth-child(3) { animation-delay: .3s; }
.nul-bel--erbij { align-self: center; max-width: none; display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 9px 20px 9px 9px; background: var(--zwart, #0D0707); color: var(--wit, #fff); border-radius: 999px; animation: nul-bloop .7s cubic-bezier(.34, 1.56, .64, 1) both; }
.nul-bel--erbij img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; animation: nul-bloop .7s cubic-bezier(.34, 1.56, .64, 1) .15s both; }
.nul-bel--erbij strong { display: block; font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.nul-bel--erbij small { display: block; font-size: 13px; opacity: .65; }
.nul-bel--erbij .nul__online { margin-left: 6px; animation: nul-knipper 1.6s ease-in-out infinite; }
.nul-bel--kaart { align-self: stretch; max-width: none; display: grid; gap: 10px; padding: 18px; background: var(--wit, #fff); border-bottom-left-radius: 6px; }
.nul-bel__kop { font-weight: 700; font-size: 18px; line-height: 1.2; }
.nul-bel__veld { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.nul-bel__veld small { font-weight: 400; color: var(--grijs, #705C5C); }
.nul-bel__veld input { min-height: 46px; padding: 0 16px; border: 1.5px solid rgba(13, 7, 7, .16); border-radius: 999px; font-weight: 500; font-size: 16px; background: var(--zacht, #F7F0E9); outline: none; cursor: text; transition: border-color .25s, background .25s; }
.nul-bel__veld input:focus { border-color: var(--zwart, #0D0707); background: var(--wit, #fff); }
.nul-bel__lok { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nul-bel__fout { min-height: 1.3em; color: var(--rood, #DC0000); font-size: 13px; font-weight: 700; }
.nul-bel__fout:empty { display: none; }
.nul-bel__knop { justify-self: start; height: 50px; padding: 0 26px; margin-top: 4px; border-radius: 999px; background: var(--rood, #DC0000); color: var(--wit, #fff); font-weight: 700; font-size: 16px; transition: background .3s, opacity .3s; }
.nul-bel__knop:hover { background: var(--zwart, #0D0707); }
.nul-bel__knop:disabled { opacity: .5; cursor: default; }
.nul-bel--kaart.is-klaar { opacity: .55; pointer-events: none; }
.nul-bel__veld.is-fout input { border-color: var(--rood, #DC0000); background: var(--wit, #fff); }
/* Regel onder de typbolletjes zolang de assistent iets opzoekt */
.nul-knop.is-later .nul-knop__online { display: none; }
.nul-zoekt { align-self: flex-start; padding: 0 6px; font-size: 13px; color: var(--grijs, #705C5C); animation: nul-bel-in .5s cubic-bezier(.22, 1, .36, 1) both; }
/* Het korte verslag aan het eind van het gesprek */
.nul-verslag { align-self: stretch; max-width: none; display: grid; gap: 4px; padding: 18px; background: var(--zwart, #0D0707); color: var(--wit, #fff); border-radius: 20px; }
.nul-verslag__label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.nul-verslag__kop { font-weight: 700; font-size: 20px; line-height: 1.2; }
.nul-verslag__site { font-size: 14px; opacity: .7; overflow-wrap: anywhere; }
.nul-verslag__tussen { margin-top: 12px; font-size: 13px; font-weight: 700; opacity: .6; }
.nul-verslag__vac { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.nul-verslag__vac li { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-size: 13.5px; font-weight: 500; }
.nul-verslag__punten { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.45; }
.nul-verslag__punten li { position: relative; padding-left: 16px; }
.nul-verslag__punten li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--rood, #DC0000); }
@keyframes nul-bel-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes nul-stip { 50% { transform: translateY(-5px); opacity: .3; } }
@keyframes nul-bloop { 0% { opacity: 0; transform: scale(.4); } 60% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes nul-knipper { 50% { opacity: .35; } }

.nul__opties { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px; background: var(--zacht, #F7F0E9); }
.nul__opties:not(:empty) { padding-bottom: 14px; }
.nul__optie { padding: 9px 15px !important; border: 1.5px solid var(--zwart, #0D0707) !important; border-radius: 999px; font-weight: 700 !important; font-size: 14px !important; line-height: 1.2 !important; text-align: left; animation: nul-bel-in .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * .06s); transition: background .25s, color .25s, border-color .25s; }
.nul__optie:hover { background: var(--zwart, #0D0707) !important; color: var(--wit, #fff) !important; }
.nul__optie--vink[aria-pressed="true"] { background: var(--zwart, #0D0707) !important; color: var(--wit, #fff) !important; }
.nul__optie--vink::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; border: 1.5px solid currentColor; border-radius: 3px; vertical-align: -1px; }
.nul__optie--vink[aria-pressed="true"]::before { background: var(--wit, #fff); box-shadow: inset 0 0 0 2px var(--zwart, #0D0707); }
.nul__optie--stuur { background: var(--rood, #DC0000) !important; border-color: var(--rood, #DC0000) !important; color: var(--wit, #fff) !important; }
.nul__optie--stuur:hover { background: var(--zwart, #0D0707) !important; border-color: var(--zwart, #0D0707) !important; }
.nul__optie--stuur:disabled { background: transparent !important; border-color: rgba(13, 7, 7, .22) !important; color: var(--grijs, #705C5C) !important; font-weight: 500 !important; cursor: default; }
.nul__optie--vink[aria-pressed="false"]:hover { background: rgba(13, 7, 7, .08) !important; color: inherit !important; }
.nul__optie--stil { border-color: rgba(13, 7, 7, .22) !important; font-weight: 500 !important; color: var(--grijs, #705C5C) !important; }
.nul__optie--stil:hover { border-color: var(--zwart, #0D0707) !important; }

.nul__invoer { display: flex; gap: 8px; margin: 0; padding: 12px 12px 6px 18px; border-top: 1px solid rgba(13, 7, 7, .1); }
.nul__invoer input { flex: 1; min-width: 0; font-weight: 500 !important; font-size: 16px !important; outline: none; cursor: text; }
.nul__invoer input::placeholder { color: var(--grijs, #705C5C); opacity: .7; }
.nul__invoer input:disabled { opacity: .4; }
.nul__stuur { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--rood, #DC0000) !important; color: var(--wit, #fff) !important; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), opacity .3s; }
.nul__stuur:hover { transform: scale(1.08); }
.nul__stuur:disabled { opacity: .35; transform: none; cursor: default; }
.nul__stuur svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nul__privacy { padding: 0 18px 14px; font-size: 11.5px; color: var(--grijs, #705C5C); }
.nul__privacy a { text-decoration: underline; text-underline-offset: 2px; color: inherit; }
.nul__verborgen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 719px) {
  .nul { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 18px; transform-origin: 50% 90%; }
  .nul-knop { font-size: 16px; padding-right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .nul, .nul-bel, .nul__optie, .nul__bol, .nul-knop, .nul-knop__online::after { animation: none !important; transition: none !important; }
}
