/* Local presentation layer for Chatwoot CE 4.19.1. No channel or API changes. */
:root {
  --w-ink: #203a35;
  --w-muted: #61756f;
  --w-accent: #13735b;
  --w-soft: #e8f3ed;
  --w-canvas: #f5f7f4;
  --w-line: #e1e8e3;
  --w-paper: #fff;
}
/* Chatwoot sets .dark on <body> (themeHelper.js), not on <html>. */
body:not(.dark) #app {
  --background-color: 245 247 244;
  --surface-1: 255 255 255;
  --surface-2: 255 255 255;
  --slate-11: 89 107 100;
  --slate-12: 32 51 46;
  --border-weak: 225 232 227;
  --border-container: 225 232 227;
  --blue-3: 232 243 237;
  --blue-4: 217 235 224;
  --blue-9: 19 115 91;
  --blue-10: 15 99 78;
  --blue-11: 19 115 91;
}
.dark {
  --w-ink: #e2eee8;
  --w-muted: #a8bdb3;
  --w-accent: #87d4b2;
  --w-soft: #1b352c;
  --w-canvas: #141d19;
  --w-line: #314139;
  --w-paper: #1b2520;
}
#app > div > aside { background: var(--w-canvas); border-color: var(--w-line); }
#app > div > aside > section { margin: 16px 0 20px; gap: 14px; }
#app aside nav { padding: 0 12px 20px; }
#app aside nav > ul { gap: 6px; }
#app aside nav a, #app aside nav button { transition: background-color .15s, color .15s; }
#app aside nav a[role="button"] { min-height: 38px; }
#app aside nav a[aria-current="page"] { color: var(--w-accent); background: var(--w-soft); font-weight: 600; }
#app aside a[href$="/search"] { min-height: 36px; background: var(--w-paper); border: 1px solid var(--w-line); border-radius: 9px; }
#app aside a:has([data-test-id="channel-leaf-label"]) { height: auto; min-height: 57px; padding: 9px 10px; gap: 9px; border: 1px solid transparent; }
#app aside a:has([data-test-id="channel-leaf-label"])[aria-current="page"] { border-color: var(--w-line); box-shadow: 0 2px 4px #16392b05; }
#app [data-test-id="channel-leaf-label"] { line-height: 1.5; font-size: 13px; }
#app [data-test-id="channel-leaf-label"] > span { display: none; }
#app [data-test-id="channel-identifier"] { display: block; font-size: 11px; color: var(--w-muted); overflow: hidden; text-overflow: ellipsis; }
#app aside a:has(.i-woot-whatsapp) > span { width: 29px; height: 29px; flex-shrink: 0; background: var(--w-soft); color: var(--w-accent); border-radius: 9px; }
#app aside a:has(.i-woot-website) > span { width: 29px; height: 29px; flex-shrink: 0; background: rgb(var(--slate-3)); border-radius: 9px; }
#app main:has(.conversations-list-wrap) { flex-direction: column; min-width: 0; background: var(--w-paper); }
#app main > section:has(.conversations-list-wrap) { flex: 1; min-height: 0; height: auto; }
.w-workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; min-height: 86px; padding: 18px 28px; border-bottom: 1px solid var(--w-line); background: var(--w-paper); }
.w-eyebrow { display: block; margin: 0 0 5px; color: var(--w-muted); font-size: 10px; line-height: 1.4; font-weight: 650; letter-spacing: .15em; text-transform: uppercase; }
.w-workspace-title { color: var(--w-ink); font-size: 23px; line-height: 1.2; letter-spacing: -.6px; font-weight: 600; }
.w-workspace-actions { display: flex; align-items: center; gap: 14px; }
.w-channel-note { flex-shrink: 0; padding: 11px 24px; background: #fff7e5; color: #7a591a; border-bottom: 1px solid #f0e2c5; font-size: 12px; line-height: 1.6; }
.dark .w-channel-note { background: #352d1a; color: #eed29a; border-color: #51442b; }
.w-environment { padding: 6px 10px; border: 1px solid var(--w-line); border-radius: 20px; color: var(--w-muted); font-size: 11px; white-space: nowrap; }
.w-search { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--w-muted); text-decoration: none; }
.w-search kbd { border: 1px solid var(--w-line); border-radius: 5px; padding: 3px 5px; font-size: 10px; }
#app .conversations-list-wrap { border-right: 1px solid var(--w-line); background: var(--w-paper); }
#app .conversations-list-wrap > div:first-child { min-height: 64px; height: auto; padding: 14px 18px; align-items: center; flex-wrap: wrap; }
#app .conversations-list-wrap > div:first-child > div:first-child { flex: 1; justify-content: flex-start; }
#app .conversations-list-wrap h1 { font-size: 15px; line-height: 1.4; font-weight: 600; white-space: normal; overflow: visible; }
#app .conversations-list-wrap > div:has(> ul) { padding-left: 18px; padding-right: 18px; height: 44px; }
#app .conversations-list-wrap > p { color: var(--w-muted); font-size: 13px; line-height: 1.7; padding: 24px; text-align: center; }
#app .conversations-list { background: var(--w-paper); }
#app .conversations-list > div > div { transition: background .15s; }
#app .conversations-list .conversation.active { background: var(--w-soft); box-shadow: inset 3px 0 var(--w-accent); }
#app .conversation--user { font-weight: 600; }
.w-empty-host { width: 100%; padding: clamp(24px, 4vw, 64px); overflow-y: auto; background: var(--w-canvas); }
#app main section > div:has(.w-empty-host) { background: var(--w-canvas); }
#app main div:has(> .w-empty-host) { width: 100%; min-height: 0; }
/* Keep Vue-owned nodes intact; replace only their presentation when our card exists. */
.w-empty-host:has(> .w-welcome) > :not(.w-welcome) { display: none; }
.w-welcome { width: 100%; max-width: 500px; margin: auto; color: var(--w-ink); }
.w-message-mark { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 26px; border: 1px solid #c9dfd0; border-radius: 18px; color: var(--w-accent); background: var(--w-soft); box-shadow: 0 7px 20px #21483706; }
.w-message-mark svg { width: 29px; height: 29px; }
.w-welcome h2 { margin: 0 0 12px; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.14; letter-spacing: -1.2px; font-weight: 600; white-space: pre-line; }
.w-welcome p { margin: 0; max-width: 390px; font-size: 14px; line-height: 1.8; color: var(--w-muted); }
.w-channel-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; margin-top: 26px; color: var(--w-ink); text-decoration: none; border: 1px solid var(--w-line); border-radius: 13px; background: var(--w-paper); box-shadow: 0 3px 8px #193e2d03; transition: border-color .15s, box-shadow .15s; }
.w-channel-link:hover { border-color: var(--w-accent); box-shadow: 0 4px 12px #193e2d09; }
.w-channel-link + .w-channel-link { margin-top: 10px; }
.w-channel-link strong { display: block; font-size: 14px; font-weight: 600; }
.w-channel-link small { display: block; margin-top: 5px; color: var(--w-muted); font-size: 12px; }
.w-channel-tag { color: var(--w-accent); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 650; }
.w-demo-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 19px; font-size: 12px; color: var(--w-muted); text-decoration: none; }
.w-demo-link:hover, .w-search:hover { color: var(--w-accent); }
.w-shortcut-note { margin-top: 42px !important; font-size: 11px !important; }
.w-shortcut-note kbd { font: inherit; padding: 2px 5px; border: 1px solid var(--w-line); border-radius: 4px; }
.w-welcome a:focus-visible, .w-workspace-bar a:focus-visible { outline: 2px solid var(--w-accent); outline-offset: 4px; }
@media (min-width: 1280px) {
  #app .conversations-list-wrap { width: 360px; }
}
@media (max-width: 1000px) {
  .w-workspace-bar { min-height: 74px; padding: 16px 20px; }
  .w-workspace-title { font-size: 21px; }
  .w-welcome h2 { font-size: 26px; }
  .w-empty-host { padding: 24px; }
  .w-channel-link { padding: 14px; flex-wrap: wrap; }
}
@media (max-width: 767px) {
  .w-workspace-bar { min-height: 74px; padding-left: 52px; padding-right: 16px; gap: 8px; }
  .w-workspace-actions { gap: 0; }
  .w-search { display: none; }
  .w-workspace-title { font-size: 19px; }
  .w-eyebrow { font-size: 9px; }
  .w-environment { font-size: 10px; padding: 5px 8px; }
  #app main > section > .conversations-list-wrap { width: 100%; min-width: 0; }
  #app .conversations-list-wrap > div:first-child { padding: 13px 16px; }
  #app .conversations-list-wrap > div:has(> ul) { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #app aside nav a, #app aside nav button, .w-channel-link { transition: none; }
}
