/* City Leasing brand for the self-hosted Chatwoot (dashboard, login and chat window).
   Chatwoot has no custom-CSS setting; nginx adds this file to every page.
   Chatwoot colours are RGB triplets in CSS variables, so the blue/iris scales are re-pointed to the brand red #D92D20. */

/* ==========================================================================
   1. STANDALONE CHATWOOT (chat.cityleasing.duckdns.org)
   ========================================================================== */
:root:not(.is-chatiko-embedded),
:root.dark:not(.is-chatiko-embedded),
.dark:not(.is-chatiko-embedded) {
  --blue-1: 255 252 252; --blue-2: 255 247 246; --blue-3: 254 235 233; --blue-4: 254 222 218;
  --blue-5: 253 205 199; --blue-6: 250 184 177; --blue-7: 245 158 149; --blue-8: 237 122 111;
  --blue-9: 217 45 32;   --blue-10: 196 38 26;  --blue-11: 180 30 20;  --blue-12: 90 16 11;
  --iris-1: 255 252 252; --iris-2: 255 247 246; --iris-3: 254 235 233; --iris-4: 254 222 218;
  --iris-5: 253 205 199; --iris-6: 250 184 177; --iris-7: 245 158 149; --iris-8: 237 122 111;
  --iris-9: 217 45 32;   --iris-10: 196 38 26;  --iris-11: 180 30 20;  --iris-12: 90 16 11;
  --solid-blue: 254 222 218; --solid-blue-2: 255 247 246; --solid-iris: 254 235 233; --solid-purple: 254 235 233;
  --text-blue: 90 16 11; --text-purple: 90 16 11; --border-blue: 217, 45, 32, .5; --border-blue-strong: 140 24 16;
  --slate-12: 15 23 42;
}

:root:not(.is-chatiko-embedded) .bg-n-brand,
:root:not(.is-chatiko-embedded) [class~="hover:bg-n-brand"]:hover { background-color: #D92D20 !important; }
:root:not(.is-chatiko-embedded) .text-n-brand,
:root:not(.is-chatiko-embedded) [class~="hover:text-n-brand"]:hover { color: #D92D20 !important; }
:root:not(.is-chatiko-embedded) .border-n-brand,
:root:not(.is-chatiko-embedded) .outline-n-brand { border-color: #D92D20 !important; outline-color: #D92D20 !important; }
:root:not(.is-chatiko-embedded) .ring-n-brand { --tw-ring-color: #D92D20 !important; }
:root:not(.is-chatiko-embedded) .text-n-blue-text,
:root:not(.is-chatiko-embedded) .text-n-blue-11,
:root:not(.is-chatiko-embedded) a.text-n-brand { color: #B42318 !important; }

html:not(.is-chatiko-embedded),
body:not(.is-chatiko-embedded),
button, input, select, textarea {
  font-family: 'Inter', 'Noto Sans Georgian', system-ui, -apple-system, 'Segoe UI', sans-serif !important;
}

button, input:not([type=checkbox]):not([type=radio]), select, textarea { border-radius: 10px; }
:focus-visible { outline: 2px solid #D92D20; outline-offset: 2px; }

body:not(.is-chatiko-embedded):has(form[action*="sign_in"], input[type=password]) { background: #f8fafc; }
::selection { background: rgba(217, 45, 32, .18); }

/* The voice-call channel is not used: hide its menu entry */
a[href*="/calls"], li:has(> a[href*="/calls"]) { display: none !important; }

/* Dark sidebar like City Leasing CMS */
body:not(.is-chatiko-embedded) aside {
  --slate-3: 30 41 59; --slate-11: 203 213 225; --slate-12: 255 255 255;
  background: #0f172a !important; border-color: #1e293b !important; color: #cbd5e1;
}
body:not(.is-chatiko-embedded) aside .bg-n-background { background: transparent !important; }
body:not(.is-chatiko-embedded) aside .text-n-slate-11,
body:not(.is-chatiko-embedded) aside .text-n-slate-10 { color: #cbd5e1 !important; }
body:not(.is-chatiko-embedded) aside .text-n-slate-12,
body:not(.is-chatiko-embedded) aside .text-n-slate-12 * { color: #fff !important; }
body:not(.is-chatiko-embedded) aside .bg-n-alpha-2,
body:not(.is-chatiko-embedded) aside a.active,
body:not(.is-chatiko-embedded) aside .active { background: rgba(217, 45, 32, .28) !important; }
body:not(.is-chatiko-embedded) aside .bg-n-strong,
body:not(.is-chatiko-embedded) aside .border-n-weak { background-color: #334155; border-color: #1e293b !important; }
body:not(.is-chatiko-embedded) aside input,
body:not(.is-chatiko-embedded) aside .bg-n-alpha-black2 { background: #1e293b !important; color: #fff !important; border-color: #334155 !important; }
body:not(.is-chatiko-embedded) aside input::placeholder { color: #94a3b8 !important; }
body:not(.is-chatiko-embedded) aside button:not(.bg-n-brand) { color: #cbd5e1; }
body:not(.is-chatiko-embedded) aside :focus-visible { outline-color: #fca5a5; }

body:not(.is-chatiko-embedded) aside button:not(.bg-n-brand),
body:not(.is-chatiko-embedded) aside [class*="bg-n-solid"],
body:not(.is-chatiko-embedded) aside [class*="bg-n-alpha"]:not(.active) { background-color: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
body:not(.is-chatiko-embedded) aside [class*="bg-n-solid"] *,
body:not(.is-chatiko-embedded) aside footer *,
body:not(.is-chatiko-embedded) aside .text-n-slate-10 { color: #e2e8f0 !important; }

body:not(.is-chatiko-embedded) aside .bg-gradient-to-t.pointer-events-none { display: none !important; }
body:not(.is-chatiko-embedded) aside section > div.border-t { background: #0f172a !important; border-color: #1e293b !important; box-shadow: none !important; }

/* Dashboard shortcut added by georgian.js (cl-dashboard-link) */
#cl-dashboard-link { display: flex; align-items: center; gap: 8px; margin: 4px 8px 8px; padding: 8px 12px; border-radius: 10px; background: #D92D20; color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; }
#cl-dashboard-link:hover { background: #B42318; }

/* Country dropdown in Pre-Chat form: high z-index and clean visibility */
.country-dropdown {
  z-index: 99999 !important;
  max-width: 100% !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
}

/* White-label: hide stock Chatwoot widget branding */
a[href*="chatwoot.com"], .branding--wrap, .branding--link, [class*="branding"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ==========================================================================
   2. EMBEDDED MODE INSIDE CHATIKO (chatiko.duckdns.org)
   ========================================================================== */
html.is-chatiko-embedded :root,
html.is-chatiko-embedded,
body.is-chatiko-embedded {
  --blue-1: 255 253 246; --blue-2: 255 249 232; --blue-3: 255 241 199; --blue-4: 255 230 163;
  --blue-5: 255 217 122; --blue-6: 252 203 88;  --blue-7: 247 188 64;  --blue-8: 243 184 58;
  --blue-9: 241 178 50;  --blue-10: 224 160 30; --blue-11: 107 74 0;   --blue-12: 60 40 0;
  --iris-1: 255 253 246; --iris-2: 255 249 232; --iris-3: 255 241 199; --iris-4: 255 230 163;
  --iris-5: 255 217 122; --iris-6: 252 203 88;  --iris-7: 247 188 64;  --iris-8: 243 184 58;
  --iris-9: 241 178 50;  --iris-10: 224 160 30; --iris-11: 107 74 0;   --iris-12: 60 40 0;
  --solid-blue: 255 230 163; --solid-blue-2: 255 249 232; --solid-iris: 255 241 199; --solid-purple: 255 241 199;
  --text-blue: 107 74 0; --text-purple: 107 74 0; --border-blue: 241, 178, 50, .6; --border-blue-strong: 107 74 0;
  --slate-12: 23 26 30;
  --focus-ring: 241 178 50;
  font-family: 'Urbanist Variable', 'Urbanist', 'Inter', 'Noto Sans Georgian', system-ui, sans-serif !important;
}

html.is-chatiko-embedded:not(.show-sidebar) aside,
body.is-chatiko-embedded:not(.show-sidebar) aside,
.is-chatiko-embedded #mobile-sidebar-launcher,
.is-chatiko-embedded #cl-dashboard-link {
  display: none !important;
}

html.is-chatiko-embedded.show-sidebar aside,
body.is-chatiko-embedded.show-sidebar aside {
  display: flex !important;
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
  height: 100vh !important;
  position: relative !important;
  z-index: 50 !important;
  background: #0f172a !important;
  border-right: 1px solid #1e293b !important;
  overflow-y: auto !important;
}

html.is-chatiko-embedded,
body.is-chatiko-embedded {
  background: transparent !important;
  overflow: hidden !important;
  height: 100% !important;
  min-height: 100% !important;
}

.is-chatiko-embedded #app {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.is-chatiko-embedded main {
  border-radius: 14px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.is-chatiko-embedded .bg-n-brand,
.is-chatiko-embedded [class~="hover:bg-n-brand"]:hover { background-color: #f1b232 !important; color: #171a1e !important; }
.is-chatiko-embedded .text-n-brand,
.is-chatiko-embedded [class~="hover:text-n-brand"]:hover { color: #6b4a00 !important; }
.is-chatiko-embedded .border-n-brand,
.is-chatiko-embedded .outline-n-brand { border-color: #f1b232 !important; outline-color: #f1b232 !important; }
