/* Wattify-huisstijl voor Chatwoot. Primaire kleur #b6d83d, font Roboto. */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");

:root {
  --blue-1: 252 253 247;  --blue-2: 246 250 231;  --blue-3: 233 243 197;
  --blue-4: 221 236 163;  --blue-5: 208 230 129;  --blue-6: 195 223 95;
  --blue-7: 182 216 61;   --blue-8: 165 200 48;   --blue-9: 152 184 37;
  --blue-10: 135 163 33;  --blue-11: 113 137 28;  --blue-12: 36 44 9;
}
.dark {
  --blue-1: 17 20 8;      --blue-2: 22 27 10;     --blue-3: 32 42 12;
  --blue-4: 40 54 14;     --blue-5: 50 67 17;     --blue-6: 62 82 21;
  --blue-7: 78 104 26;    --blue-8: 100 133 30;   --blue-9: 152 184 37;
  --blue-10: 165 200 48;  --blue-11: 195 223 95;  --blue-12: 233 243 197;
}
html, body, button, input, select, textarea {
  font-family: "Roboto", -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif !important;
}

/* ── Leesbare berichten (2026-11-24) ───────────────────────────────────────────────
   FreeScout-achtige draad: volle breedte, plat, één rij per bericht met een lijn ertussen;
   klant wit, wij lichtblauw, notitie lichtgrijs; afzender vet bovenaan, tijd rechtsboven; e-mails
   niet meer ingeklapt. Nieuwste bovenaan doet wattify.js. Selectors uit Chatwoot v4.18. */

:root { --wf-ink: #1f2933; --wf-muted: #6b7785; --wf-line: #e3e8ed; }

/* De draad: volle breedte, geen zijmarge */
.conversation-panel { padding-inline: 0 !important; }
html:not(.dark) .conversation-panel { background: #fff !important; }

/* Elke rij: plat, volle breedte, lijn eronder */
.conversation-panel > .message-bubble-container:not(.justify-center) {
  margin: 0 !important; padding: 14px 24px; border-bottom: 1px solid var(--wf-line);
  justify-content: flex-start !important;
}
html.dark .conversation-panel > .message-bubble-container:not(.justify-center) { border-bottom-color: rgb(var(--slate-6)); }
.conversation-panel > .message-bubble-container:not(.justify-center) > div:not(.context-menu-wrap) { width: 100% !important; }
.conversation-panel > .message-bubble-container:not(.justify-center) [class~="[grid-area:bubble]"] {
  margin: 0 !important; justify-content: flex-start !important;
}
.conversation-panel > .message-bubble-container:not(.justify-center) [class~="[grid-area:bubble]"] > div {
  position: relative; width: 100%; max-width: none !important; padding: 0 !important;
  background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.conversation-panel > .message-bubble-container .prose { max-width: none !important; }

/* Kleuren per rij: klant wit, wij lichtblauw, notitie lichtgrijs */
html:not(.dark) .message-bubble-container:has(.right-bubble) { background: #f1f6fb; }
html:not(.dark) .message-bubble-container:has(.bg-n-solid-amber) { background: #f4f5f7; box-shadow: inset 3px 0 0 #b8c0ca; }
html.dark .message-bubble-container:has(.bg-n-solid-amber) { box-shadow: inset 3px 0 0 rgb(var(--slate-8)); }
html:not(.dark) .message-bubble-container:has(.bg-n-ruby-4) { background: #fdf0f0; }

/* Tekst */
.message-bubble-container :is(.prose, .letter-render),
.message-bubble-container .letter-render :is(p, div, span, li, td) { font-size: 14px; line-height: 1.6; }
html:not(.dark) .message-bubble-container :is(.prose, .letter-render) { color: var(--wf-ink); }

/* E-mailkop: afzender vet, Aan/Onderwerp klein en grijs, geen eigen vlak */
[data-bubble-name="email"] > section.space-y-1 {
  padding: 0 140px 8px 0 !important; border: 0 !important; background: none !important;
  font-size: 12.5px !important; line-height: 1.45; color: var(--wf-muted) !important;
}
[data-bubble-name="email"] > section.space-y-1 > div:first-child { font-size: 15px; font-weight: 600; color: var(--wf-ink) !important; }
html.dark [data-bubble-name="email"] > section.space-y-1 > div:first-child { color: rgb(var(--slate-12)) !important; }
[data-bubble-name="email"] > section.p-3:not(.space-y-1) { padding: 0 !important; }
[data-bubble-name="email"] > section.px-4 { padding: 8px 0 0 !important; }

/* Tijd rechtsboven bij e-mails */
[data-bubble-name="email"] > .text-xs:last-child {
  position: absolute; top: 2px; right: 0; margin: 0 !important; padding: 0 !important; font-size: 12px !important;
  color: var(--wf-muted) !important;
}
.message-bubble-container .text-xs { font-size: 12px !important; }

/* E-mails niet meer inklappen ("Expand email" weg) */
[data-bubble-name="email"] .max-h-\[400px\] { max-height: none !important; }
[data-bubble-name="email"] .bg-gradient-to-t { display: none !important; }

/* Activiteiten ("Gesprek werd gemarkeerd …"): een kleine grijze regel */
.conversation-panel > .message-bubble-container.justify-center {
  margin: 0 !important; padding: 5px 24px; border-bottom: 1px solid var(--wf-line);
}
.message-bubble-container.justify-center :is(div, span, p) {
  font-size: 12px !important; background: none !important; padding: 0 !important; color: var(--wf-muted) !important;
}

/* Antwoordvak ingeklapt tot je kiest (wattify.js) */
.resizable-editor-wrapper.wf-reply-folded { display: none !important; }
.wf-reply-bar { display: none; gap: 10px; justify-content: center; padding: 10px 16px; border-top: 1px solid var(--wf-line); }
.wf-reply-bar.is-visible { display: flex; }
.wf-reply-bar button { padding: 7px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; border: 1px solid transparent; cursor: pointer; }
.wf-reply-bar button[data-mode="reply"] { background: #b6d83d; color: #16201a; }
.wf-reply-bar button[data-mode="reply"]:hover { background: #a5c830; }
.wf-reply-bar button[data-mode="note"] { background: #fff; color: #1f2933; border-color: #cbd2d9; }
.wf-reply-bar button[data-mode="note"]:hover { background: #f4f5f7; }
.wf-reply-fold { display: none; position: absolute; top: 18px; right: 96px; z-index: 5; font-size: 12px; padding: 3px 10px; border-radius: 999px; color: rgb(var(--slate-11)); background: rgba(0, 0, 0, .05); }
.wf-reply-fold.is-visible { display: block; }
.wf-reply-fold:hover { color: rgb(var(--slate-12)); }
/* Notitievak in het grijs in plaats van Chatwoots geel */
html:not(.dark) .reply-box.is-private, html:not(.dark) .reply-box.is-private :is(.bg-n-solid-amber, [class*="bg-n-solid-amber"]) { background: #f4f5f7 !important; }
.reply-box.is-private button.bg-n-amber-9 { background: rgb(var(--blue-9)) !important; color: #fff !important; }
.reply-box.is-private button.bg-n-amber-9:hover:enabled { background: rgb(var(--blue-10)) !important; }
/* Activiteiten (toewijzingen, prioriteit, labels) links uitgelijnd */
.conversation-panel > .message-bubble-container.justify-center { justify-content: flex-start !important; text-align: left; }
.conversation-panel > .message-bubble-container.justify-center > div { margin: 0 !important; text-align: left; }
/* Interne notities ingeklapt (wattify.js): één regel met ▸, klik om open te klappen, klik de eerste regel om weer dicht te doen */
.conversation-panel > .message-bubble-container[data-wf-note="collapsed"] { cursor: pointer; padding-top: 8px; padding-bottom: 8px; }
.conversation-panel > .message-bubble-container[data-wf-note]:not(.justify-center) [class~="[grid-area:bubble]"] > div.bg-n-solid-amber { padding-right: 150px !important; }
[data-wf-note] .bg-n-solid-amber > .text-xs:last-child { position: absolute; top: 2px; right: 0; margin: 0 !important; }
[data-wf-note="collapsed"] .bg-n-solid-amber .prose { display: block; max-height: 1.6em; overflow: hidden; }
[data-wf-note="collapsed"] .bg-n-solid-amber .prose > :first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-wf-note="collapsed"] .bg-n-solid-amber .flex-col > :not(:first-child) { display: none !important; }
[data-wf-note] .bg-n-solid-amber .prose > :first-child::before { content: "▸"; display: inline-block; width: 1.2em; color: var(--wf-muted); }
[data-wf-note="open"] .bg-n-solid-amber .prose > :first-child::before { content: "▾"; }
[data-wf-note="open"] .bg-n-solid-amber .prose > :first-child { cursor: pointer; }
/* Antwoordknoppen rustig: twee gelijke neutrale knoppen, geen lime vlak */
.wf-reply-bar { gap: 8px; padding: 8px 16px; }
.wf-reply-bar button, .wf-reply-bar button[data-mode="reply"], .wf-reply-bar button[data-mode="note"] {
  padding: 5px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  background: transparent; color: var(--wf-ink); border: 1px solid #d5dbe1;
}
.wf-reply-bar button:hover, .wf-reply-bar button[data-mode="reply"]:hover, .wf-reply-bar button[data-mode="note"]:hover { background: #f4f5f7; border-color: #b8c0ca; }
html.dark .wf-reply-bar button { color: rgb(var(--slate-12)); border-color: rgb(var(--slate-7)); }
html.dark .wf-reply-bar button:hover { background: rgb(var(--slate-3)); }
