/* Praktijkassistent v182 · huisstijl TDC (navy, turquoise, één gouden zon), Inter.
   Beweging: alleen transform/opacity, korte duur, alles uit bij ‘minder beweging’. */
.tdc-chat, .tdc-chat-launch { --n: #172b4d; --n2: #10213c; --t: #27a7a3; --tt: #1a7c79; --m: #72d5d0; --mz: #e6f6f4; --z: #f2cf55; --g: #4f5f75; --l: #e1e9ee; --r: #b42318; --rz: #fdeeee; --e: cubic-bezier(.23,1,.32,1); }

/* ── Startknop ── */
.tdc-chat-launch { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: var(--tdc-chat-bottom, 20px); z-index: 110; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 18px 6px 6px; border: 1px solid rgba(23,43,77,.08); border-radius: 999px; background: rgba(255,255,255,.96); color: var(--n); box-shadow: 0 1px 2px rgba(16,33,60,.08), 0 14px 34px -12px rgba(16,33,60,.4); font: 750 15px/1 Inter, system-ui, sans-serif; cursor: pointer; backdrop-filter: blur(10px); -webkit-tap-highlight-color: transparent; }
.tdc-chat-launch-logo { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--mz); }
.tdc-chat-launch-logo svg { width: 30px; height: 30px; }
.tdc-chat-launch-stip { position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--t); box-shadow: 0 0 0 2px #fff; }
.tdc-chat-launch-stip::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--t); opacity: 0; }
.tdc-chat-launch[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .tdc-chat-launch { transition: transform .18s var(--e), box-shadow .2s ease; }
  .tdc-chat-launch.is-binnen { animation: tdcChatIn .7s var(--e) both; }
  .tdc-chat-launch.is-binnen .tdc-chat-launch-stip { animation: tdcChatStip .55s cubic-bezier(.34,1.6,.64,1) .45s both; }
  .tdc-chat-launch.is-binnen .tdc-chat-launch-stip::after { animation: tdcChatPing 1.6s var(--e) 1s 1; }
  .tdc-chat-launch:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(16,33,60,.08), 0 20px 40px -14px rgba(16,33,60,.5); }
  .tdc-chat-launch:hover .tdc-chat-launch-logo svg { animation: tdcWiebel .6s var(--e); }
  .tdc-chat-launch:active { transform: scale(.96); }
  @keyframes tdcChatIn { from { opacity: 0; transform: translateY(26px) scale(.9); } }
  @keyframes tdcChatStip { from { transform: scale(0); } }
  @keyframes tdcChatPing { 0% { opacity: .8; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.2); } }
  @keyframes tdcWiebel { 0%, 100% { rotate: 0deg; } 30% { rotate: -9deg; } 65% { rotate: 6deg; } }
}

/* ── Venster ── */
.tdc-chat { position: fixed; inset: auto max(16px, env(safe-area-inset-right)) 16px auto; margin: 0; width: min(440px, calc(100vw - 32px)); height: min(680px, calc(100svh - 32px)); padding: 0; border: 0; border-radius: 28px; background: #fbfcfd; color: var(--n); box-shadow: 0 2px 6px rgba(16,33,60,.08), 0 40px 90px -30px rgba(16,33,60,.55); font-family: Inter, system-ui, sans-serif; overflow: hidden; }
.tdc-chat[open] { display: flex; flex-direction: column; }
.tdc-chat * { box-sizing: border-box; }
.tdc-chat::backdrop { background: rgba(11,24,48,.38); backdrop-filter: blur(3px); }
@media (prefers-reduced-motion: no-preference) {
  .tdc-chat { transform-origin: calc(100% - 60px) calc(100% - 30px); transition: opacity .22s var(--e), transform .32s var(--e), overlay .32s allow-discrete, display .32s allow-discrete; }
  .tdc-chat:not([open]) { opacity: 0; transform: translateY(18px) scale(.94); transition-duration: .16s; }
  @starting-style { .tdc-chat[open] { opacity: 0; transform: translateY(18px) scale(.94); } }
  .tdc-chat::backdrop { transition: opacity .25s ease, overlay .25s allow-discrete, display .25s allow-discrete; }
  @starting-style { .tdc-chat[open]::backdrop { opacity: 0; } }
}

/* Kop: navy met de glimlachlijnen van de site */
.tdc-chat header { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 16px 18px 18px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #24457a 0%, var(--n2) 60%); overflow: hidden; }
.tdc-chat-lijnen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tdc-chat-lijnen path { fill: none; stroke: var(--m); stroke-width: 1.4; opacity: .35; stroke-dasharray: 600; stroke-dashoffset: 600; }
.tdc-chat-lijnen path + path { opacity: .18; }
.tdc-chat[open] .tdc-chat-lijnen path { animation: tdcLijn 1.4s cubic-bezier(.65,0,.35,1) .1s forwards; }
@keyframes tdcLijn { to { stroke-dashoffset: 0; } }
.tdc-chat-avatar { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 3px rgba(114,213,208,.35); }
.tdc-chat-avatar svg { width: 30px; height: 30px; }
.tdc-chat-avatar img { width: 40px; height: 40px; object-fit: contain; }
.tdc-chat header > div { position: relative; z-index: 1; min-width: 0; }
.tdc-chat-brand { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.tdc-chat-sub { margin: 3px 0 0; color: #b9c5d6; font-size: 12.5px; }
.tdc-chat-close { position: relative; z-index: 1; margin-left: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; transition: background-color .2s ease, transform .16s var(--e); }
.tdc-chat-close:hover { background: rgba(255,255,255,.2); }
.tdc-chat-close:active { transform: scale(.92); }
.tdc-chat-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Inhoud */
.tdc-chat-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 18px 12px; display: flex; flex-direction: column; gap: 18px; scroll-padding-top: 12px; }
.tdc-chat h2 { margin: 0; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; color: var(--n); }
.tdc-chat h2 span { display: block; }
.tdc-chat h2 .w2 { color: var(--tt); }
.tdc-chat-stip { display: inline-block; width: .2em; height: .2em; margin-left: .05em; border-radius: 50%; background: var(--z); }
.tdc-chat-intro { margin: 10px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--g); }
.tdc-chat-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tdc-chat-options button { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 10px; min-height: 60px; padding: 10px 12px; border: 1px solid var(--l); background: #fff; color: var(--n); border-radius: 16px; font: 650 14px/1.3 Inter, system-ui, sans-serif; text-align: left; cursor: pointer; transition: border-color .2s ease, background-color .2s ease, transform .16s var(--e), box-shadow .2s ease; }
.tdc-chat-options .ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--mz); }
.tdc-chat-options svg, .tdc-chat-topic svg, .tdc-chat-response nav svg, .tdc-chat-footer svg, .tdc-chat-call svg, .tdc-chat-submit svg, .duim svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tdc-chat-options svg { color: var(--tt); }
@media (hover: hover) and (pointer: fine) { .tdc-chat-options button:hover { border-color: var(--m); background: #f4fbfa; transform: translateY(-1px); box-shadow: 0 10px 20px -16px rgba(16,33,60,.5); } }
.tdc-chat-options button:active { transform: scale(.97); }

/* Berichten */
.tdc-chat-messages { display: flex; flex-direction: column; gap: 14px; }
.tdc-chat-bubble { margin: 0; padding: 12px 16px; border-radius: 18px 18px 6px 18px; line-height: 1.5; font-size: 15.5px; overflow-wrap: anywhere; }
.tdc-chat-bubble--user { align-self: flex-end; max-width: 86%; background: var(--n); color: #fff; }
.tdc-chat-response { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.tdc-chat-topic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mz); color: var(--tt); }
.tdc-chat-answer { display: grid; gap: 12px; padding: 14px 16px; border-radius: 6px 18px 18px 18px; background: #fff; box-shadow: 0 0 0 1px var(--l), 0 10px 24px -20px rgba(16,33,60,.5); }
.tdc-chat-answer p { margin: 0; line-height: 1.6; font-size: 15.5px; }
.tdc-chat-response nav { display: flex; flex-wrap: wrap; gap: 8px; }
.tdc-chat-response nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 12px 8px 14px; border-radius: 999px; color: var(--n); background: var(--mz); font-size: 14px; font-weight: 750; text-decoration: none; transition: background-color .2s ease, transform .16s var(--e); }
.tdc-chat-response nav a:first-child { background: var(--m); }
.tdc-chat-response nav a svg { width: 15px; height: 15px; transition: transform .2s var(--e); }
@media (hover: hover) and (pointer: fine) { .tdc-chat-response nav a:hover svg { transform: translateX(3px); } }
.tdc-chat-response nav a:active { transform: scale(.97); }
/* Spoedkaart */
.tdc-chat-response.is-spoed .tdc-chat-topic { background: var(--rz); color: var(--r); }
.tdc-chat-response.is-spoed .tdc-chat-answer { background: #fff8f8; box-shadow: 0 0 0 1.5px #f3c0c0, 0 10px 24px -20px rgba(180,35,24,.5); }
.tdc-chat-call { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; border-radius: 14px; background: var(--r); color: #fff; font-weight: 800; font-size: 16px; text-decoration: none; }
.tdc-chat-call svg { width: 20px; height: 20px; }
/* Feedback */
.tdc-chat-feedback { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; color: var(--g); font-size: 13px; }
.tdc-chat-feedback span { margin-right: 4px; }
.duim { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: #fff; border: 1px solid var(--l); border-radius: 50%; color: var(--g); cursor: pointer; transition: transform .16s var(--e), background-color .2s ease, color .2s ease; }
.duim-no svg { transform: rotate(180deg); }
.duim:active { transform: scale(.9); }
.duim[aria-pressed="true"] { background: var(--mz); color: var(--tt); border-color: var(--m); }
@media (prefers-reduced-motion: no-preference) { .duim[aria-pressed="true"] svg { animation: tdcDuim .45s cubic-bezier(.34,1.6,.64,1); } .duim-no[aria-pressed="true"] svg { animation-name: tdcDuimNee; } @keyframes tdcDuim { 0% { transform: scale(.6) rotate(-14deg); } } @keyframes tdcDuimNee { 0% { transform: rotate(180deg) scale(.6); } 100% { transform: rotate(180deg); } } }
/* Typ-indicator */
.tdc-chat-typing { align-self: flex-start; display: flex; gap: 5px; margin-left: 44px; padding: 14px 16px; border-radius: 6px 18px 18px 18px; background: #fff; box-shadow: 0 0 0 1px var(--l); }
.tdc-chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--t); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
  .tdc-chat-typing i { animation: tdcTyp 1s ease-in-out infinite; }
  .tdc-chat-typing i:nth-child(2) { animation-delay: .15s; } .tdc-chat-typing i:nth-child(3) { animation-delay: .3s; }
  @keyframes tdcTyp { 0%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
  .tdc-chat-bubble--user { animation: tdcBericht .32s var(--e) both; transform-origin: right bottom; }
  .tdc-chat-response { animation: tdcAntwoord .42s var(--e) both; }
  .tdc-chat-response nav a, .tdc-chat-feedback { animation: tdcAntwoord .4s var(--e) both; animation-delay: .12s; }
  .tdc-chat-response .tdc-chat-call { animation: tdcAntwoord .4s var(--e) .08s both; }
  .tdc-chat[open] .tdc-chat-welcome { animation: tdcAntwoord .5s var(--e) .08s both; }
  .tdc-chat[open] .tdc-chat-options button { animation: tdcAntwoord .45s var(--e) both; animation-delay: calc(.16s + var(--i, 0) * 50ms); }
  @keyframes tdcBericht { from { opacity: 0; transform: translateY(8px) scale(.96); } }
  @keyframes tdcAntwoord { from { opacity: 0; transform: translateY(10px); } }
}

/* Invoer */
.tdc-chat form { display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 6px 6px 6px 16px; border: 1.5px solid #c9d6de; border-radius: 999px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease; }
.tdc-chat form:focus-within { border-color: var(--t); box-shadow: 0 0 0 4px rgba(39,167,163,.15); }
.tdc-chat input { flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--n); font: 400 16px Inter, system-ui, sans-serif; }
.tdc-chat input::placeholder { color: #7b8a9c; }
.tdc-chat-submit { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--n); color: #fff; cursor: pointer; transition: background-color .2s ease, transform .16s var(--e), opacity .2s ease; }
.tdc-chat-submit:not(:disabled):hover { background: #24457a; }
.tdc-chat-submit:not(:disabled):active { transform: scale(.92); }
.tdc-chat-submit:disabled { opacity: .35; cursor: default; }
.tdc-chat-footer { display: flex; justify-content: center; padding: 8px 18px 12px; }
.tdc-chat-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 13.5px; font-weight: 650; color: var(--g); text-decoration: none; }
.tdc-chat-footer a span { text-decoration: underline; text-decoration-color: rgba(79,95,117,.35); text-underline-offset: 4px; }
.tdc-chat-status { margin: 8px 18px 0; font-size: 14px; color: var(--r); }
.tdc-chat :is(button, a, input):focus-visible, .tdc-chat-launch:focus-visible, .tdc-pip-chat:focus-visible { outline: 3px solid var(--n); outline-offset: 3px; box-shadow: 0 0 0 6px var(--z) !important; }
.tdc-chat header :is(button):focus-visible { outline-color: var(--z); box-shadow: none !important; }
.tdc-chat form input:is(:focus, :focus-visible) { outline: 0 !important; box-shadow: none !important; border: 0 !important; }
.tdc-chat [hidden] { display: none !important; }

/* Pip-modus */
.tdc-chat.is-pip header { background: radial-gradient(120% 140% at 100% 0%, #3fb8b3 0%, #1a7c79 70%); }
.tdc-chat.is-pip .tdc-chat-avatar { background: #e6f6f4; }
.tdc-chat.is-pip .tdc-chat-sub { color: #e6f6f4; }
.tdc-pip-chat { position: relative; display: block; width: 100%; padding: 0; border: 0; background: transparent; border-radius: 24px; cursor: pointer; }
.tdc-pip-chat img { width: 100%; height: auto; }
.tdc-pip-chat-label { position: absolute; left: 50%; bottom: 6%; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #172b4d; color: #fff; font: 750 14px Inter, system-ui, sans-serif; white-space: nowrap; translate: -50% 0; box-shadow: 0 12px 26px -12px rgba(16,33,60,.6); transition: transform .2s cubic-bezier(.23,1,.32,1); }
.tdc-pip-chat-label i { width: 8px; height: 8px; border-radius: 50%; background: #72d5d0; }
@media (hover: hover) and (pointer: fine) { .tdc-pip-chat:hover .tdc-pip-chat-label { transform: translateY(-3px); } }
@media (prefers-reduced-motion: no-preference) { .tdc-pip-chat-label i { animation: tdcChatPing2 2.4s ease-in-out 1.5s 2; } @keyframes tdcChatPing2 { 50% { transform: scale(1.5); } } }

/* Mobiel: paneel dat van onderen omhoog schuift */
@media (max-width: 560px) {
  .tdc-chat { inset: auto 0 0 0; width: 100%; max-width: 100%; height: min(88svh, 720px); border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .tdc-chat header { padding-top: 22px; }
  .tdc-chat header::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.35); }
  .tdc-chat-launch { right: 12px; }
  .tdc-chat-launch-tekst { font-size: 14px; }
  .tdc-chat-body { padding: 18px 14px 10px; }
  .tdc-chat form { margin: 0 10px; }
  @media (prefers-reduced-motion: no-preference) {
    .tdc-chat:not([open]) { transform: translateY(100%); opacity: 1; }
    @starting-style { .tdc-chat[open] { transform: translateY(100%); opacity: 1; } }
    .tdc-chat { transition: transform .38s var(--e), overlay .38s allow-discrete, display .38s allow-discrete; }
  }
}
@media (prefers-reduced-motion: reduce) { .tdc-chat, .tdc-chat * , .tdc-chat-launch, .tdc-chat-launch * { animation: none !important; transition: none !important; } .tdc-chat-lijnen path { stroke-dashoffset: 0; } }

/* Integratie in de actuele website: focus, kleine schermen en schermtoetsenbord. */
.tdc-chat{max-height:var(--tdc-chat-maxheight,calc(100svh - 32px));max-width:calc(100vw - 32px)}
.tdc-chat-body{min-height:0}.tdc-chat header,.tdc-chat form,.tdc-chat-footer{flex-shrink:0}
.tdc-chat header{inset:auto;height:auto;box-shadow:none}.tdc-chat-response nav{position:static;display:flex}
.tdc-chat-sub,.tdc-chat-feedback,.tdc-chat-footer a{font-size:14px}
.tdc-chat-intro,.tdc-chat-bubble,.tdc-chat-answer p{font-size:16px}
.tdc-chat-response nav a,.tdc-chat-footer a{min-height:44px}.tdc-chat-feedback button{width:44px;height:44px}
.tdc-chat :is(button,a,input):focus-visible,.tdc-chat-launch:focus-visible,.tdc-pip-chat:focus-visible{box-shadow:none!important;outline-color:#172b4d}
.tdc-chat header button:focus-visible{outline-color:#f2cf55}
.tdc-chat form:focus-within{border-color:#172b4d;box-shadow:0 0 0 2px #172b4d}
@media(max-width:560px){.tdc-chat{max-width:100%;bottom:var(--tdc-chat-keyboard,0px);max-height:var(--tdc-chat-maxheight,calc(100svh - 24px))}.tdc-chat-answer{padding:12px}.tdc-chat-response{grid-template-columns:26px minmax(0,1fr);gap:7px}.tdc-chat-topic{width:26px;height:26px}.tdc-chat-options button{gap:7px;padding:10px}.tdc-chat header{gap:10px}.tdc-chat-sub{line-height:1.35}}

/* v184: compacte toegang; mobiel in de kop, nooit over de inhoud. */
.tdc-chat-launch{min-height:48px;gap:8px;padding:6px 14px 6px 6px;font-size:14px}
.tdc-chat-launch.is-binnen,.tdc-chat-launch *{animation:none!important}
.tdc-chat-launch-logo{width:34px;height:32px;border-radius:10px;background:#e6f6f4}
.tdc-chat-launch-logo::after{content:"";position:absolute;left:5px;bottom:-2px;width:8px;height:8px;background:#e6f6f4;transform:rotate(30deg);border-radius:2px}
.tdc-chat-launch-logo svg{position:relative;z-index:1;width:25px;height:25px}
.tdc-chat-header{display:none}
.site-header .main-nav .tdc-chat-menu{display:none}
.tdc-chat-contact{display:inline-flex;align-items:center;min-height:48px;margin-top:16px;padding:10px 16px;border:1px solid #b8d8d6;border-radius:12px;background:#e6f6f4;color:#172b4d;font:700 16px Inter,system-ui,sans-serif;cursor:pointer}
.tdc-chat-contact:focus-visible,.tdc-chat-header:focus-visible{outline:3px solid #172b4d;outline-offset:3px}
@media(max-width:1080px){
 .tdc-chat-launch{display:none!important}
 .site-header :is(.header-inner,.nav-wrap){gap:8px}
 .site-header .tdc-chat-header{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:4px 7px;margin-left:auto;border:1px solid #d9e7e6;border-radius:12px;background:#f5fbfa;color:#172b4d;font:700 14px Inter,system-ui,sans-serif;cursor:pointer}
 .tdc-chat-header .tdc-chat-launch-logo{position:relative;display:grid;place-items:center;width:25px;height:25px;border-radius:7px}
 .tdc-chat-header .tdc-chat-launch-logo svg{width:22px;height:22px}
 .site-header .menu-button{margin-left:0}
 .site-header .main-nav .tdc-chat-menu{display:flex;align-items:center;min-height:48px}
}
@media(max-width:420px){.site-header .brand{width:clamp(125px,calc(100vw - 210px),170px);flex:0 1 auto}.site-header .brand img{width:100%;max-width:100%}}

/* Laadmelding neutraal; alleen een echte fout in rood. */
.tdc-chat-status{color:#4f5f75}.tdc-chat-status.is-fout{color:#b42318}
