/* ============================================
   Wall-E Fleet GmbH — Docmost Branding Override
   Colors: #2653b0 (Primary Blue), #0b0d10 (Dark Navy), #e8ebf0 (Light Gray)
   Font: Manrope (Google Fonts)
   ============================================ */

/* Import Manrope font */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ---- Global Font Override ---- */
body,
.mantine-Text-root,
.mantine-Title-root,
.mantine-Button-label,
.mantine-Input-input,
.mantine-NavLink-label,
.ProseMirror,
.tiptap {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ---- Sidebar / Navigation Branding ---- */

/* Replace "Docmost" text in the header with Wall-E Wiki (logo only, not breadcrumb) */
.mantine-AppShell-header .mantine-Group-root:not(.mantine-visible-from-sm) > a[href="/home"] {
  font-size: 0 !important;           /* hide original text */
  font-family: 'Manrope', sans-serif !important;
}

.mantine-AppShell-header .mantine-Group-root:not(.mantine-visible-from-sm) > a[href="/home"]::after {
  content: 'WALL-E Wiki';
  font-size: 1rem;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 700 !important;
  letter-spacing: -0.5px;
}

/* Primary accent color — links, active items */
[data-active="true"],
.mantine-NavLink-root[data-active="true"],
.mantine-Tabs-tab[data-active="true"] {
  color: #2653b0 !important;
}

.mantine-Tabs-tab[data-active="true"]::after,
.mantine-Tabs-tabsList::after {
  border-color: #2653b0 !important;
}

/* Active sidebar item highlight */
.mantine-NavLink-root[data-active="true"] {
  background-color: rgba(38, 83, 176, 0.08) !important;
}

/* Buttons — primary actions */
.mantine-Button-root[data-variant="filled"] {
  background-color: #2653b0 !important;
  border-color: #2653b0 !important;
}

.mantine-Button-root[data-variant="filled"]:hover {
  background-color: #1e4494 !important;
}

/* ---- Light Mode Overrides ---- */
[data-mantine-color-scheme="light"] {
  /* Subtle blue tint to backgrounds */
  --mantine-color-body: #f8f9fc;
}

[data-mantine-color-scheme="light"] .mantine-AppShell-navbar {
  border-right-color: #e0e4ed !important;
}

/* ---- Dark Mode Overrides ---- */
[data-mantine-color-scheme="dark"] {
  --mantine-color-body: #0b0d10;
}

[data-mantine-color-scheme="dark"] .mantine-AppShell-navbar {
  background-color: #0f1117 !important;
  border-right-color: #1a1d26 !important;
}

[data-mantine-color-scheme="dark"] .mantine-AppShell-header {
  background-color: #0f1117 !important;
  border-bottom-color: #1a1d26 !important;
}

/* ---- Editor Styling ---- */
.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3 {
  font-family: 'Manrope', sans-serif !important;
  font-weight: 700 !important;
}

.ProseMirror h2 {
  color: #2653b0;
}

/* Blockquote styling — Wall-E blue accent */
.ProseMirror blockquote {
  border-left-color: #2653b0 !important;
  background-color: rgba(38, 83, 176, 0.04) !important;
}

[data-mantine-color-scheme="dark"] .ProseMirror blockquote {
  background-color: rgba(38, 83, 176, 0.08) !important;
}

/* Table header — dark navy */
.ProseMirror table th {
  background-color: #0b0d10 !important;
  color: #e8ebf0 !important;
  font-weight: 600 !important;
}

[data-mantine-color-scheme="light"] .ProseMirror table th {
  background-color: #2653b0 !important;
  color: #ffffff !important;
}

/* Horizontal rule — subtle blue */
.ProseMirror hr {
  border-color: rgba(38, 83, 176, 0.2) !important;
}

/* ---- Search Bar ---- */
.mantine-Spotlight-content {
  font-family: 'Manrope', sans-serif !important;
}

/* AI Answer — prevent text from overflowing the Spotlight dialog */
.mantine-Spotlight-actionsList .mantine-ScrollArea-content {
  min-width: 0 !important;
}

.mantine-Spotlight-actionsList .mantine-Paper-root {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

.mantine-Spotlight-actionsList .mantine-Stack-root {
  max-width: 100%;
}

/* ---- Scrollbar Styling (Webkit) ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(38, 83, 176, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(38, 83, 176, 0.4);
}

/* ---- Page title styling ---- */
.page-title,
[class*="pageTitle"],
.ProseMirror > h1:first-child {
  font-family: 'Manrope', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px;
}
