/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');

/* Tailwind CSS directives */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Modern Docusaurus Theme Variables */
:root {
  /* Primary Colors - Modern Blue to Purple Gradient */
  --ifm-color-primary: #3b82f6;
  --ifm-color-primary-dark: #2563eb;
  --ifm-color-primary-darker: #1d4ed8;
  --ifm-color-primary-darkest: #1e40af;
  --ifm-color-primary-light: #60a5fa;
  --ifm-color-primary-lighter: #93c5fd;
  --ifm-color-primary-lightest: #dbeafe;

  /* Modern Typography */
  --ifm-font-family-base: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ifm-font-size-base: 16px;
  --ifm-line-height-base: 1.6;
  --ifm-heading-font-weight: 700;
  --ifm-font-weight-semibold: 600;
  --ifm-font-weight-bold: 700;

  /* Modern Spacing and Layout */
  --ifm-spacing-horizontal: 1.5rem;
  --ifm-spacing-vertical: 1.5rem;
  --ifm-container-width: 1200px;
  --ifm-container-width-xl: 1400px;

  /* Modern Border Radius */
  --ifm-border-radius: 12px;
  --ifm-card-border-radius: 16px;
  --ifm-button-border-radius: 12px;
  --ifm-code-border-radius: 8px;

  /* Modern Colors */
  --ifm-background-color: #ffffff;
  --ifm-background-surface-color: rgba(255, 255, 255, 0.8);
  --ifm-color-content: #1f2937;
  --ifm-heading-color: #111827;
  --ifm-color-content-secondary: #6b7280;

  /* Modern Shadows */
  --ifm-global-shadow-lw: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --ifm-global-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ifm-global-shadow-tl: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Modern Navbar - Warp Style (two rows) */
  --ifm-navbar-height: auto;
  --ifm-navbar-background-color: rgba(255, 255, 255, 0.95);
  --ifm-navbar-shadow: none;
  --ifm-navbar-padding-horizontal: 1.5rem;
  --ifm-navbar-padding-vertical: 0;

  /* Modern Sidebar */
  --ifm-sidebar-width: 320px;
  --doc-sidebar-width: 320px;
  --ifm-menu-color: #6b7280;
  --ifm-menu-color-active: #1f2937;
  --ifm-menu-color-background-active: rgba(59, 130, 246, 0.1);
  --ifm-menu-color-background-hover: rgba(59, 130, 246, 0.05);

  /* Code Blocks */
  --ifm-code-font-size: 14px;
  --ifm-code-background: #f8fafc;
  --ifm-code-color: #1e293b;
  --ifm-pre-background: #0f172a;
  --ifm-pre-color: #e2e8f0;

  /* Custom Properties */
  --uc-border-color: #e5e7eb;
  --uc-text-letter-spacing: -0.025em;
  --uc-gradient-primary: linear-gradient(135deg, #3b82f6 0%, #c084fc 100%);
  --uc-backdrop-blur: blur(12px);

  /* Custom Purple Color Variables - Lighter Variants */
  --uc-purple-50: #faf5ff;
  --uc-purple-100: #f3e8ff;
  --uc-purple-200: #e9d5ff;
  --uc-purple-300: #d8b4fe;
  --uc-purple-400: #c084fc;
  --uc-purple-500: #a855f7;
  --uc-purple-600: #9333ea;
  --uc-purple-700: #7c3aed;
  --uc-purple-800: #6b21a8;
  --uc-purple-900: #581c87;
}

/* Modern Dark Mode Theme */
[data-theme='dark'] {
  /* Primary Colors for Dark Mode */
  --ifm-color-primary: #60a5fa;
  --ifm-color-primary-dark: #3b82f6;
  --ifm-color-primary-darker: #2563eb;
  --ifm-color-primary-darkest: #1d4ed8;
  --ifm-color-primary-light: #93c5fd;
  --ifm-color-primary-lighter: #bfdbfe;
  --ifm-color-primary-lightest: #dbeafe;

  /* Dark Mode Colors */
  --ifm-background-color: #0f172a;
  --ifm-background-surface-color: rgba(15, 23, 42, 0.8);
  --ifm-color-content: #e2e8f0;
  --ifm-heading-color: #f8fafc;
  --ifm-color-content-secondary: #94a3b8;

  /* Dark Mode Navbar - Warp Style */
  --ifm-navbar-background-color: rgba(15, 23, 42, 0.95);
  --ifm-navbar-shadow: none;

  /* Dark Mode Sidebar */
  --ifm-menu-color: #94a3b8;
  --ifm-menu-color-active: #f8fafc;
  --ifm-menu-color-background-active: rgba(96, 165, 250, 0.15);
  --ifm-menu-color-background-hover: rgba(96, 165, 250, 0.1);

  /* Dark Mode Code */
  --ifm-code-background: #1e293b;
  --ifm-code-color: #e2e8f0;
  --ifm-pre-background: #020617;
  --ifm-pre-color: #f1f5f9;
  --docusaurus-highlighted-code-line-bg: rgba(96, 165, 250, 0.1);

  /* Custom Dark Properties */
  --uc-border-color: #334155;
  --uc-gradient-primary: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
}

.navbar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Mobile overlay background */
.theme-layout-navbar.navbar-sidebar--show::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.20);
  /* Softer dimming */
  backdrop-filter: blur(2px);
  z-index: 1;
}

/* Mobile sidebar panel */
.navbar-sidebar {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.12);
  z-index: 2;
  /* above overlay */
}

[data-theme='dark'] .navbar-sidebar {
  background: rgba(15, 23, 42, 0.70) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-sidebar .menu__link,
.navbar-sidebar .menu__list-item {
  color: var(--ifm-color-content) !important;
}

[data-theme='dark'] .navbar-sidebar .menu__link,
[data-theme='dark'] .navbar-sidebar .menu__list-item {
  color: var(--ifm-color-content) !important;
}

.navbar-sidebar .menu__link--active {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--ifm-color-primary) !important;
  border-left: 3px solid var(--ifm-color-primary) !important;
}

.navbar-sidebar__back {
  font-weight: 600;
  color: var(--ifm-color-primary);
  padding: 1rem;
  background: transparent;
  backdrop-filter: none;
}

@media (max-width: 996px) {
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

body {
  letter-spacing: var(--uc-text-letter-spacing);
}

.uc-button {
  color: var(--ifm-color-content);
  border-radius: 0.5rem;
  background: #FF9DFF;
  display: inline-flex;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}

.uc-button:hover {
  color: var(--ifm-color-content);
  background: #E08AE0;
  text-decoration: none;
}

/* Modern Docusaurus Component Overrides */

/* Global Body Styling */
body {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
  min-height: 100vh;
}

[data-theme='dark'] body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Warp-style Navbar - two-row layout */
.navbar {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--uc-border-color);
  transition: all 0.2s ease;
  height: auto !important;
  flex-wrap: wrap;
}

.navbar__brand {
  font-weight: 700;
  font-size: 1.125rem;
  margin-right: 2rem;
}

.navbar__title {
  font-weight: 700;
  background: var(--uc-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar__item {
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.navbar__link {
  padding: 0.5rem 0.75rem;
  border-radius: 0;
}

.navbar__link:hover {
  background: none;
  color: var(--ifm-color-primary);
}

.navbar__link--active {
  color: var(--ifm-color-primary);
  font-weight: 600;
}

/* Modern Sidebar */
.theme-doc-sidebar-container {
  backdrop-filter: var(--uc-backdrop-blur);
  -webkit-backdrop-filter: var(--uc-backdrop-blur);
  border-right: 1px solid var(--uc-border-color);
}

.menu__link {
  border-radius: 12px;
  margin: 2px 0;
  padding: 8px 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu__link:hover {
  transform: translateX(4px);
  box-shadow: var(--ifm-global-shadow-lw);
}

.menu__link--active {
  background: var(--ifm-menu-color-background-active);
  border-left: 3px solid var(--ifm-color-primary);
  font-weight: 600;
}

.menu__list-item-collapsible {
  border-radius: 12px;
  margin: 4px 0;
}

.menu__caret {
  transition: transform 0.2s ease;
}

/* Modern Content Area */
.main-wrapper {
  background: transparent;
}

.container {
  max-width: var(--ifm-container-width-xl);
}

/* Modern Cards and Content */
.card {
  border-radius: var(--ifm-card-border-radius);
  box-shadow: var(--ifm-global-shadow-md);
  border: 1px solid var(--uc-border-color);
  backdrop-filter: var(--uc-backdrop-blur);
  -webkit-backdrop-filter: var(--uc-backdrop-blur);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--ifm-global-shadow-tl);
}

/* Modern Code Blocks */
.prism-code {
  border-radius: var(--ifm-code-border-radius);
  box-shadow: var(--ifm-global-shadow-md);
  border: 1px solid var(--uc-border-color);
}

/* Modern Buttons */
.button {
  border-radius: var(--ifm-button-border-radius);
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: var(--ifm-global-shadow-lw);
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--ifm-global-shadow-md);
}

.button--primary {
  background: var(--uc-gradient-primary);
  border: none;
}

/* Modern Pagination */
.pagination__item {
  border-radius: var(--ifm-border-radius);
  margin: 0 4px;
}

.pagination__item--active .pagination__link {
  background: var(--uc-gradient-primary);
  border: none;
}

/* Modern TOC */
.table-of-contents {
  border-left: 2px solid var(--uc-border-color);
  padding-left: 1rem;
}

.table-of-contents__link {
  border-radius: 8px;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.table-of-contents__link:hover {
  background: var(--ifm-menu-color-background-hover);
  transform: translateX(2px);
}

.table-of-contents__link--active {
  background: var(--ifm-menu-color-background-active);
  color: var(--ifm-color-primary);
  font-weight: 600;
}

/* Search Local – custom properties (officially supported) */
:root {
  --search-local-modal-width: 480px;
  --search-local-modal-width-sm: 90vw;
}

.searchBar_RVTs {
  width: 100%;
}

/* Mobile sidebar search – ensure input and dropdown stay within bounds */
.navbar-sidebar .navbar__search {
  width: 100%;
  margin-left: 0 !important;
}

.navbar-sidebar .navbar__search-input {
  width: 100% !important;
}

.navbar-sidebar .navbar__search [class*='dropdownMenu'] {
  width: 100% !important;
  max-width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

/* Modern Breadcrumbs */
.breadcrumbs {
  margin-bottom: 2rem;
}

.breadcrumbs__item {
  font-weight: 500;
}

.breadcrumbs__link {
  border-radius: 8px;
  padding: 4px 8px;
  transition: all 0.2s ease;
}

.breadcrumbs__link:hover {
  background: var(--ifm-menu-color-background-hover);
  transform: translateY(-1px);
}

/* Modern docs page specific styles */
.modern-docs-page {
  --ifm-navbar-height: 0px;
}

.modern-docs-page .navbar {
  display: none;
}

.modern-docs-page * {
  box-sizing: border-box;
}

/* Image backgrounds for dark mode - Unisphere for Dummies */
[data-theme='dark'] img[src*="assets/images/"] {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


[data-theme='dark'] img[src*="assets/images/"]:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 996px) {
  .navbar__item {
    padding: 0.5rem;
  }

  .menu__link {
    padding: 12px 16px;
  }

  [data-theme='dark'] img[src*="assets/images/"] {
    padding: 0.75rem;
  }
}