/* ========================================================
   RUSH BRANDING - WHITE THEME FOR CHATWOOT
   Primary Background: Crisp White (#ffffff / #f8f9fa)
   Brand Accent: Rush Primary Red (#c91e2f)
   Typography: Space Grotesk
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Typography Overrides */
body, button, input, textarea, select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1, h2, h3, h4, h5, h6,
.font-interDisplay,
.text-3xl, .text-2xl, .text-xl,
.font-medium, .font-semibold, .font-bold,
button[type="submit"],
.button {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: -0.01em;
}

/* 1. Global Color Variables - White Theme */
:root,
html,
body {
  /* Rush Brand Colors */
  --rush-red: #c91e2f;
  --rush-red-hover: #b01826;
  --rush-red-glow: rgba(201, 30, 47, 0.2);
  --rush-black: #000000;
  --rush-white: #ffffff;
  --rush-surface-1: #ffffff;
  --rush-surface-2: #f8f9fa;
  --rush-surface-3: #f1f3f5;
  --rush-border: #e4e4e7;
  --rush-border-light: #ececf0;

  /* Chatwoot Native Variables */
  --w-500: #c91e2f !important;
  --w-600: #b01826 !important;
  --brand: #c91e2f !important;

  /* Backgrounds & Surfaces */
  --background-color: 255 255 255 !important;
  --surface-1: 255 255 255 !important;
  --surface-2: 248 249 250 !important;
  --surface-active: 241 243 245 !important;

  --solid-1: 255 255 255 !important;
  --solid-2: 248 249 250 !important;
  --solid-3: 241 243 245 !important;
  --solid-active: 232 234 238 !important;

  --card-color: 255 255 255 !important;
  --card-background: #ffffff !important;

  --border-weak: 228 228 231 !important;
  --border-strong: 212 212 216 !important;
  --border-container: 228, 228, 231 !important;

  --button-color: 244 244 245 !important;

  /* Blue / Brand Accents mapped to Rush Red (#c91e2f = 201, 30, 47) */
  --blue-9: 201 30 47 !important;
  --blue-10: 176 24 38 !important;
  --blue-11: 201 30 47 !important;
  --solid-blue: 201 30 47 !important;

  /* Iris Accents mapped to Rush Red */
  --iris-9: 201 30 47 !important;
  --iris-10: 176 24 38 !important;
  --iris-11: 201 30 47 !important;
  --solid-iris: 201 30 47 !important;
}

/* 2. Pure White App Background */
html,
body,
#app,
main,
.app-wrapper,
.dashboard-app,
.min-h-screen,
.bg-n-background {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #09090b !important;
}

/* 3. Primary Sidebar (Navigation Rail) */
aside,
.sidebar,
.main-nav,
nav[aria-label="Sidebar"],
.bg-n-solid-1 {
  background-color: #ffffff !important;
  border-right: 1px solid #e4e4e7 !important;
}

/* Sidebar Active / Hover states */
nav a.router-link-active,
nav a[aria-current="page"],
.sidebar-link.active {
  background-color: rgba(201, 30, 47, 0.08) !important;
  color: #c91e2f !important;
  border-left: 3px solid #c91e2f !important;
}

/* 4. Secondary Column (Conversation list) */
.conversations-sidebar,
.conversation-list,
.bg-n-surface-1 {
  background-color: #f8f9fa !important;
  border-right: 1px solid #e4e4e7 !important;
}

/* Active conversation item */
.conversation-card.active,
.conversation--item.active {
  background-color: #ffffff !important;
  border-left: 3px solid #c91e2f !important;
}
.conversation-card:hover {
  background-color: #ffffff !important;
}

/* 5. Main Conversation / Chat Window */
.conversation-panel,
.chat-panel,
.bg-n-surface-2 {
  background-color: #ffffff !important;
}

/* Outgoing Messages (Agent reply - Rush Red) */
.message-bubble--outgoing,
.chat-bubble.agent,
.chat-bubble.outgoing,
.bubble-sent {
  background-color: #c91e2f !important;
  color: #ffffff !important;
  border-radius: 12px 12px 2px 12px !important;
}

/* Incoming Messages (Customer message - Soft Neutral Gray) */
.message-bubble--incoming,
.chat-bubble.customer,
.chat-bubble.incoming,
.bubble-received {
  background-color: #f1f3f5 !important;
  color: #09090b !important;
  border: 1px solid #e4e4e7 !important;
  border-radius: 12px 12px 12px 2px !important;
}

/* 6. Action Buttons & Brand Highlights */
.bg-n-brand,
.bg-woot-500,
button.bg-n-brand,
.button.primary,
.button.success,
.btn-primary {
  background-color: #c91e2f !important;
  color: #ffffff !important;
  border-color: #c91e2f !important;
  box-shadow: 0 2px 8px rgba(201, 30, 47, 0.25) !important;
  transition: all 0.15s ease-in-out !important;
}

.bg-n-brand:hover,
.bg-woot-500:hover,
button.bg-n-brand:hover,
.button.primary:hover,
.btn-primary:hover {
  background-color: #b01826 !important;
  border-color: #b01826 !important;
  transform: translateY(-1px);
}

.text-n-brand,
.text-woot-500,
.text-link {
  color: #c91e2f !important;
}

/* 7. Input Fields & Focus States */
input,
textarea,
select,
.input {
  background-color: #ffffff !important;
  border: 1px solid #d4d4d8 !important;
  color: #09090b !important;
}

input:focus,
textarea:focus,
select:focus,
.input:focus,
.ProseMirror:focus {
  border-color: #c91e2f !important;
  box-shadow: 0 0 0 2px rgba(201, 30, 47, 0.2) !important;
  outline: none !important;
}

/* 8. Notification Badges & Unread Count Pills */
.badge--unread,
.unread-count,
.unread,
.bg-red-500 {
  background-color: #c91e2f !important;
  color: #ffffff !important;
}

/* 9. Login Page Specific Overrides */
.login-page,
.auth-page,
.auth-wrapper {
  background-color: #ffffff !important;
}

.auth-card,
.login-box,
.border-n-container,
section.max-w-5xl + section {
  background-color: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
}

h2, .text-n-slate-12 {
  color: #09090b !important;
}

/* 10. Large, Bold, Prominent Logo */
img.dark\:hidden,
img[src*="rush_logo.svg"],
section.max-w-5xl img {
  display: block !important;
  height: 125px !important;
  max-height: 140px !important;
  width: auto !important;
  margin: 0 auto 16px auto !important;
  object-fit: contain !important;
}

img.dark\:block,
img[src*="rush_logo_dark.svg"] {
  display: none !important;
}

/* Sidebar Logo / Favicon & Account Switcher */
aside .size-6,
nav .size-6,
.main-nav .size-6 {
  width: 26px !important;
  height: 26px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

aside .size-4,
nav .size-4,
img[src*="rush_logo_thumbnail"],
img[src*="logo_thumbnail"] {
  width: 24px !important;
  height: 24px !important;
  max-height: 26px !important;
  max-width: 26px !important;
  object-fit: contain !important;
  display: block !important;
}

aside .size-7,
button img[src*="rush_logo_thumbnail"] {
  width: 28px !important;
  height: 28px !important;
  max-height: 28px !important;
  max-width: 28px !important;
  object-fit: contain !important;
}

/* Vertical divider beside logo */
aside .w-px.h-3,
nav .w-px.h-3 {
  height: 16px !important;
  background-color: #e4e4e7 !important;
  margin: 0 4px !important;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f8f9fa;
}
::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #c91e2f;
}
