/*
 * BeatIt_Bezoekers - chat.css 1.0 (17-10-2026)
 * Eigen chatwidget in de stijl van de Text-widget (thema "smooth", licht): knop rechtsonder, venster met kaartjes,
 * berichten. Geladen in de Shadow DOM van chat.js, dus de stijlen van de winkel lopen er niet doorheen (en andersom).
 * Kleuren uit de Text-instellingen (07-10-2026): CTA #233965, bericht bezoeker #314F8C/wit, bericht medewerker
 * wit/#424D57, titel #424D57.
 */
:host { all: initial; }
* { box-sizing: border-box; }
.bz { --cta: #233965; --bezoeker: #314f8c; --tekst: #424d57; --zacht: #8a94a6; --vlak: #f4f5f7; --rand: #c9cdd3;
  --veld: #ececec; --groen: #2fa463; --rood: #e5484d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.4; color: var(--tekst); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

/* Knop (geminimaliseerd) */
.knop { position: fixed; right: 12px; bottom: 12px; z-index: 2147483000; width: 60px; height: 60px; border-radius: 50%;
  border: 0; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.18); display: flex; align-items: center;
  justify-content: center; transition: transform .15s ease; }
.knop:hover { transform: scale(1.05); }
.knop svg { width: 30px; height: 30px; fill: var(--cta); }
.badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--rood); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }

/* Voorproefje van een bericht van de medewerker (knop blijft dicht) */
.voorproef { position: fixed; right: 12px; bottom: 84px; z-index: 2147483000; width: 290px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.16); padding: 12px 36px 12px 12px;
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer; text-align: left; border: 0; }
.voorproef .tekst { font-size: 14px; color: var(--tekst); display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.voorproef .wie { display: block; font-size: 12px; color: var(--zacht); margin-bottom: 2px; }
.voorproef .weg { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: transparent; color: var(--zacht); font-size: 16px; line-height: 24px; }

/* Venster */
.venster { position: fixed; right: 15px; bottom: 15px; z-index: 2147483001; width: 390px; height: 770px;
  max-height: calc(100vh - 30px); background: var(--vlak); border-radius: 16px; box-shadow: 0 8px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 480px) {
  .venster { left: 8px; right: 8px; top: 8px; bottom: 8px; width: auto; height: auto; max-height: none; }
  .voorproef { right: 8px; }
}
.kop { display: flex; align-items: center; gap: 8px; padding: 12px 12px 6px; min-height: 48px; }
.kop .titel { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--tekst); }
.kop .titel img { height: 18px; width: auto; }
.kop .titel .stip { width: 8px; height: 8px; border-radius: 50%; background: var(--zacht); flex: none; }
.kop .titel .stip.aan { background: var(--groen); }
.rond { width: 28px; height: 28px; border-radius: 50%; border: 0; background: #e3e5e9; display: flex; align-items: center;
  justify-content: center; flex: none; }
.rond:hover { background: #d7dae0; }
.rond svg { width: 16px; height: 16px; fill: #2a2f36; }
.menu { position: absolute; top: 46px; right: 44px; z-index: 2; background: #fff; border-radius: 12px; padding: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.16); min-width: 210px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0;
  background: none; border-radius: 8px; text-align: left; font-size: 14px; }
.menu button:hover { background: #f0f1f4; }
.schakel { margin-left: auto; width: 36px; height: 20px; border-radius: 10px; background: #c9cdd3; position: relative; flex: none; }
.schakel::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.schakel.aan { background: var(--groen); }
.schakel.aan::after { left: 18px; }

/* Inhoud */
.inhoud { flex: 1; overflow-y: auto; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px;
  overscroll-behavior: contain; }
.rij { display: flex; gap: 8px; align-items: flex-end; }
.rij.bezoeker { justify-content: flex-end; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--cta); flex: none; display: flex;
  align-items: center; justify-content: center; overflow: hidden; align-self: flex-start; margin-top: 2px; }
.avatar svg { width: 13px; height: 13px; fill: #fff; }
.avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.kaart { background: #fff; border-radius: 20px; padding: 22px 22px 20px; flex: 1; max-width: 300px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.kaart p { margin: 0 0 16px; font-size: 15px; }
.kaart label { display: block; font-size: 14px; margin: 0 0 6px; }
.kaart label i { color: var(--rood); font-style: normal; margin-left: 2px; }
.kaart input, .kaart textarea { display: block; width: 100%; margin: 0 0 14px; padding: 9px 11px; font: inherit; color: var(--tekst);
  background: var(--veld); border: 1px solid var(--rand); border-radius: 6px; outline: none; }
.kaart textarea { min-height: 110px; resize: vertical; }
.kaart input:focus, .kaart textarea:focus { border-color: var(--cta); background: #fff; }
.kaart .fout { color: var(--rood); font-size: 13px; margin: -6px 0 12px; }
.kaart .onder { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.verder { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cta); display: flex;
  align-items: center; justify-content: center; }
.verder svg { width: 20px; height: 20px; fill: #fff; }
.verder:disabled { opacity: .5; cursor: default; }
.ring { width: 36px; height: 36px; position: relative; font-size: 12px; color: var(--tekst); }
.ring svg { width: 36px; height: 36px; transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.honing { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Berichten */
.bel { max-width: 78%; padding: 9px 14px; border-radius: 18px; white-space: pre-wrap; word-wrap: break-word;
  overflow-wrap: anywhere; font-size: 15px; }
.rij.agent .bel { background: #fff; color: var(--tekst); border-top-left-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.rij.bezoeker .bel { background: var(--bezoeker); color: #fff; border-bottom-right-radius: 6px; }
.rij.bezoeker .bel a { color: #fff; }
.bel a { color: var(--cta); }
.meta { font-size: 11px; color: var(--zacht); margin: 0 0 4px; }
.rij.bezoeker + .meta, .meta.rechts { text-align: right; }
.meta.links { padding-left: 34px; }
.systeem { align-self: center; text-align: center; font-size: 13px; color: var(--zacht); margin: 6px 0; max-width: 85%; }
.bezig { opacity: .6; }

/* Invoer */
.invoer { padding: 8px 12px 12px; }
.invoer form { display: flex; align-items: flex-end; gap: 8px; background: #fff; border-radius: 24px; padding: 6px 6px 6px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.invoer textarea { flex: 1; border: 0; outline: none; resize: none; font: inherit; color: var(--tekst); background: transparent;
  max-height: 120px; min-height: 24px; padding: 6px 0; line-height: 1.4; }
.invoer .verstuur { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--cta); display: flex;
  align-items: center; justify-content: center; flex: none; }
.invoer .verstuur:disabled { background: #c9cdd3; cursor: default; }
.invoer .verstuur svg { width: 18px; height: 18px; fill: #fff; }
.voet { text-align: center; font-size: 11px; color: var(--zacht); padding: 0 0 8px; }
