/* Custom styles for WhatsApp Self-Hosted Gateway */
:root {
  --wa-teal: #00a884;
  --wa-teal-dark: #008069;
  --wa-bg: #f0f2f5;
  --wa-panel: #ffffff;
  --wa-chat-bg: #efeae2;
  --wa-incoming: #ffffff;
  --wa-outgoing: #d9fdd3;
  --wa-border: #e9edef;
  --wa-text-primary: #111b21;
  --wa-text-secondary: #667781;
  --wa-blue-tick: #53bdeb;
}

/* WhatsApp Web Dark Mode Palette */
html.dark {
  --wa-bg: #0c1317;
  --wa-panel: #111b21;
  --wa-chat-bg: #0b141a;
  --wa-incoming: #202c33;
  --wa-outgoing: #005c4b;
  --wa-border: #222e35;
  --wa-text-primary: #e9edef;
  --wa-text-secondary: #8696a0;
  --wa-blue-tick: #53bdeb;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wa-text-primary);
  background-color: var(--wa-bg);
}

.chat-bg {
  background-color: var(--wa-chat-bg);
  background-image: radial-gradient(#d1d7db 0.75px, transparent 0.75px);
  background-size: 16px 16px;
}

html.dark body {
  background-color: #0b141a;
  color: #e9edef;
}

html.dark .chat-bg {
  background-color: #0b141a;
  background-image: radial-gradient(#202c33 0.75px, transparent 0.75px);
}

.message-in {
  background-color: var(--wa-incoming);
}

.message-out {
  background-color: var(--wa-outgoing);
}

html.dark .message-in {
  background-color: #202c33;
  color: #e9edef;
}

html.dark .message-out {
  background-color: #005c4b;
  color: #e9edef;
}

html.dark header {
  background-color: #111b21 !important;
  border-color: #222e35 !important;
}

html.dark .bg-white {
  background-color: #111b21 !important;
}

html.dark .bg-slate-50 {
  background-color: #1a2329 !important;
}

html.dark .bg-slate-100 {
  background-color: #202c33 !important;
}

html.dark .text-slate-900 {
  color: #e9edef !important;
}

html.dark .text-slate-800 {
  color: #d1d7db !important;
}

html.dark .text-slate-700 {
  color: #aebac1 !important;
}

html.dark .text-slate-600 {
  color: #8696a0 !important;
}

html.dark .text-slate-500 {
  color: #8696a0 !important;
}

html.dark .border-slate-200 {
  border-color: #222e35 !important;
}

html.dark .border-slate-100 {
  border-color: #202c33 !important;
}

html.dark input, html.dark select, html.dark textarea {
  background-color: #202c33 !important;
  border-color: #222e35 !important;
  color: #e9edef !important;
}

html.dark input:focus, html.dark select:focus, html.dark textarea:focus {
  background-color: #111b21 !important;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #374151;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

.tab-active {
  border-bottom: 2px solid var(--wa-teal);
  color: var(--wa-teal);
  font-weight: 600;
}
