/**
 * 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.
 */

:root {
  --ifm-color-primary: #25c2a0; /* #146ee6; */
  --ifm-menu-color: #525151;
  --ifm-font-color-base: rgba(30, 32, 34, 1);
  --ifm-navbar-background-color: white;
  --ifm-navbar-link-color: #333;
  --ifm-navbar-height: 4.5rem;
  --ifm-code-name-highlight: #84488D;
  --ifm-font-size-base:  95%;
  --ifm-toc-border-color: #dadde1b8;
  --ifm-font-family-base: 'Amazon Ember', 'Helvetica Neue', Arial, sans-serif;
}

html[data-theme="dark"] {
  --ifm-color-primary: #25c2a0;
  --ifm-menu-color: #e6e6e6;
  --ifm-font-color-base: #e6e6e6;
  --ifm-navbar-background-color: #141520;
  --ifm-navbar-link-color: #aaa;
  --ifm-navbar-height: 4.5rem;
  --ifm-code-name-highlight: #A972B1;
  --ifm-toc-border-color: #333;
  --ifm-background-color: #141520;
  --ifm-font-family-base: 'Amazon Ember', 'Helvetica Neue', Arial, sans-serif;
}

.hero__subtitle::after {
  content: '🚀';
  margin-left: 8px; /* Adjust the spacing between the tagline and the rocket */
}

.chart-embed {
  margin: 2.5rem 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22);
}

.chart-embed iframe {
  width: 100%;
  min-height: 760px;
  border: none;
  display: block;
  background: transparent;
}

@media (max-width: 768px) {
  .chart-embed iframe {
    min-height: 600px;
  }
}

.quick-snapshot {
  font-size: 1.08rem;
  line-height: 1.7;
  font-weight: 500;
}

.highlight-badge {
  font-size: 1.05rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  margin-right: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* Enhance navbar and sidebar styling */
.navbar__link {
  font-family: 'Amazon Ember', 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.025em;
  padding: 12px 16px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.navbar__link:hover {
  color: var(--ifm-color-primary);
  background: rgba(59, 130, 246, 0.1);
  transform: translateY(-1px);
}

.navbar {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme='dark'] .navbar {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Improve sidebar menu styling */
.menu__link {
  font-family: 'Amazon Ember', 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  margin: 3px 0;
  padding: 12px 16px;
  transition: all 0.3s ease;
  color: #374151 !important;
  letter-spacing: 0.025em;
}

.menu__link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
  color: #1e40af !important;
  transform: translateX(6px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

[data-theme='dark'] .menu__link {
  color: #e5e7eb !important;
}

[data-theme='dark'] .menu__link:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.15));
  color: #dbeafe !important;
}

.menu__link--active {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
  color: white !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  border-left: 4px solid #1e40af;
}

[data-theme='dark'] .menu__link--active {
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  color: white !important;
  border-left: 4px solid #3b82f6;
}

/* Fix parent menu items when child is active - using more specific selectors */
.menu__list-item-collapsible--active > .menu__link,
.menu__list-item-collapsible--active > .menu__link:hover,
.menu__list-item-collapsible--active > .menu__link:focus,
.menu__list-item-collapsible--active > .menu__link:active {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #1e40af !important;
  font-weight: 600 !important;
  border-left: 3px solid #3b82f6 !important;
}

[data-theme='dark'] .menu__list-item-collapsible--active > .menu__link,
[data-theme='dark'] .menu__list-item-collapsible--active > .menu__link:hover,
[data-theme='dark'] .menu__list-item-collapsible--active > .menu__link:focus,
[data-theme='dark'] .menu__list-item-collapsible--active > .menu__link:active {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
  border-left: 3px solid #60a5fa !important;
}

/* Override any conflicting styles for collapsible menu items */
.menu__list-item-collapsible .menu__link,
.menu__list-item-collapsible > .menu__link {
  background: transparent !important;
  color: #374151 !important;
}

[data-theme='dark'] .menu__list-item-collapsible .menu__link,
[data-theme='dark'] .menu__list-item-collapsible > .menu__link {
  background: transparent !important;
  color: #e5e7eb !important;
}

/* Specific override for when parent has active children */
.menu__list-item-collapsible:has(.menu__link--active) > .menu__link,
.menu__list-item-collapsible.menu__list-item--active > .menu__link {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #1e40af !important;
  font-weight: 600 !important;
}

[data-theme='dark'] .menu__list-item-collapsible:has(.menu__link--active) > .menu__link,
[data-theme='dark'] .menu__list-item-collapsible.menu__list-item--active > .menu__link {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
}

/* Ultra-specific overrides to prevent white background/text */
.menu__list-item-collapsible .menu__link[style*="background"],
.menu__list-item-collapsible > .menu__link[style*="background"] {
  background: transparent !important;
  color: #374151 !important;
}

[data-theme='dark'] .menu__list-item-collapsible .menu__link[style*="background"],
[data-theme='dark'] .menu__list-item-collapsible > .menu__link[style*="background"] {
  background: transparent !important;
  color: #e5e7eb !important;
}

/* Force parent styling when child is active - highest specificity */
.theme-doc-sidebar-item-category-level-1.menu__list-item-collapsible--active > .menu__link,
.theme-doc-sidebar-item-category.menu__list-item-collapsible--active > .menu__link {
  background: rgba(59, 130, 246, 0.08) !important;
  color: #1e40af !important;
  font-weight: 600 !important;
  border-left: 3px solid #3b82f6 !important;
}

[data-theme='dark'] .theme-doc-sidebar-item-category-level-1.menu__list-item-collapsible--active > .menu__link,
[data-theme='dark'] .theme-doc-sidebar-item-category.menu__list-item-collapsible--active > .menu__link {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
  border-left: 3px solid #60a5fa !important;
}

.menu__list-item {
  margin: 4px 0;
}

.menu__caret {
  transition: transform 0.3s ease;
  color: #6b7280;
}

[data-theme='dark'] .menu__caret {
  color: #9ca3af;
}

.menu__list-item--collapsed .menu__caret {
  transform: rotate(-90deg);
}

.boldTagline {
  font-weight: bold;
  /* font-family: 'Roboto Mono for Powerline', sans-serif; */
}

.button-3d {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(-5px);
  transition: transform 0.3s ease-in-out;
}

.button-sparkles {
  background-image: linear-gradient(to right, #ff3d2b 0%, #ffd941 51%, #ff2bc6 100%);
  background-size: 200% auto;
  background-position: right bottom;
  animation: sparkling 1s ease-out infinite;
  color: #070707;
}

@keyframes sparkling {
  0% {
    background-position: right bottom;
  }
  50% {
    background-position: left bottom;
  }
  100% {
    background-position: right bottom;
  }
}


.hero__subtitle {
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translatey(0);
  }
  50% {
    transform: translatey(-10px);
  }
  100% {
    transform: translatey(0);
  }
}

/* CSS Hack to style table separator for spark benchmark results table */
.benchmark-results thead tr th:nth-child(5){
  background: #141520;
}
.benchmark-results tbody tr td:nth-child(5){
  background: #141520;
}

/* ==========================================
   PROFESSIONAL CODE BLOCK STYLING
   ========================================== */

/* Code block container with enhanced styling */
.theme-code-block {
  position: relative;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, #f8fafc, #f1f5f9);
}

[data-theme='dark'] .theme-code-block {
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Code block header for filename */
.codeBlockTitle_src-theme-CodeBlock-Title-styles-module {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: none;
  position: relative;
  letter-spacing: 0.025em;
}

[data-theme='dark'] .codeBlockTitle_src-theme-CodeBlock-Title-styles-module {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Add file icon before filename */
.codeBlockTitle_src-theme-CodeBlock-Title-styles-module::before {
  content: '📄';
  margin-right: 0.5rem;
  opacity: 0.8;
}

/* Enhanced code content area */
.prism-code {
  background: transparent !important;
  padding: 1.25rem 1rem !important;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace !important;
  font-size: 0.875rem !important;
  line-height: 1.6 !important;
  overflow-x: auto;
}

/* Line numbers styling */
.token-line .token-line-content {
  padding-left: 0.5rem;
}

.prism-code .token-line::before {
  content: attr(data-line);
  position: absolute;
  left: 0;
  width: 2.5rem;
  padding-right: 0.5rem;
  text-align: right;
  color: rgba(156, 163, 175, 0.6);
  font-size: 0.75rem;
  border-right: 1px solid rgba(156, 163, 175, 0.2);
  margin-right: 1rem;
}

/* Copy button enhancement */
.clean-btn.copyButton_src-theme-CodeBlock-CopyButton-styles-module {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  padding: 0.5rem !important;
  transition: all 0.2s ease !important;
  backdrop-filter: blur(10px);
  z-index: 10;
}

[data-theme='dark'] .clean-btn.copyButton_src-theme-CodeBlock-CopyButton-styles-module {
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e2e8f0 !important;
}

.clean-btn.copyButton_src-theme-CodeBlock-CopyButton-styles-module:hover {
  background: rgba(255, 255, 255, 1) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

[data-theme='dark'] .clean-btn.copyButton_src-theme-CodeBlock-CopyButton-styles-module:hover {
  background: rgba(30, 41, 59, 1) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Language badge */
.codeBlockContainer_src-theme-CodeBlock-Container-styles-module[data-language]::after {
  content: attr(data-language);
  position: absolute;
  top: 0.75rem;
  right: 3.5rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  z-index: 5;
}

/* Highlighted lines */
.theme-code-block-highlighted-line {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border-left: 3px solid #3b82f6;
  margin: 0 -1rem;
  padding: 0 1rem;
  display: block;
}

[data-theme='dark'] .theme-code-block-highlighted-line {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Error lines */
.code-block-error-line {
  background-color: rgba(239, 68, 68, 0.1) !important;
  border-left: 3px solid #ef4444;
  margin: 0 -1rem;
  padding: 0 1rem;
  display: block;
}

[data-theme='dark'] .code-block-error-line {
  background-color: rgba(239, 68, 68, 0.15) !important;
}

/* Inline code styling */
code:not([class*="language-"]) {
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1) !important;
  color: #1e293b !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 6px !important;
  font-size: 0.875em !important;
  font-weight: 600 !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme='dark'] code:not([class*="language-"]) {
  background: linear-gradient(135deg, #374151, #1f2937) !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================
   PROFESSIONAL NAVIGATION STYLING
   ========================================== */

/* Enhanced Navbar */
.navbar {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 252, 0.98) 100%) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 4px 16px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
}

[data-theme='dark'] .navbar {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(30, 41, 59, 0.98) 100%) !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Navbar items enhancement */
.navbar__item {
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
}

.navbar__link {
  border-radius: 8px;
  padding: 0.5rem 0.75rem !important;
  transition: all 0.2s ease;
  position: relative;
}

.navbar__link:hover {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.1),
    rgba(0, 123, 191, 0.1));
  transform: translateY(-1px);
}

[data-theme='dark'] .navbar__link:hover {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.15),
    rgba(0, 123, 191, 0.15));
}

/* Enhanced Sidebar */
.theme-doc-sidebar-container {
  background: linear-gradient(135deg,
    rgba(248, 250, 252, 0.8) 0%,
    rgba(241, 245, 249, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(226, 232, 240, 0.6);
}

[data-theme='dark'] .theme-doc-sidebar-container {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.8) 0%,
    rgba(30, 41, 59, 0.9) 100%);
  border-right: 1px solid rgba(51, 65, 85, 0.4);
}

/* Sidebar menu items */
.theme-doc-sidebar-item-link {
  font-weight: 500;
  border-radius: 8px;
  margin: 0.125rem 0;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.theme-doc-sidebar-item-link:hover {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.08),
    rgba(0, 123, 191, 0.06));
  border-left-color: rgba(37, 194, 160, 0.4);
  transform: translateX(2px);
}

[data-theme='dark'] .theme-doc-sidebar-item-link:hover {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.12),
    rgba(0, 123, 191, 0.08));
}

/* Active sidebar item */
.theme-doc-sidebar-item-link--active {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.15),
    rgba(0, 123, 191, 0.1)) !important;
  border-left-color: #25c2a0 !important;
  font-weight: 600;
}

[data-theme='dark'] .theme-doc-sidebar-item-link--active {
  background: linear-gradient(135deg,
    rgba(37, 194, 160, 0.2),
    rgba(0, 123, 191, 0.15)) !important;
}

/* Sidebar category headers */
.theme-doc-sidebar-item-category > .theme-doc-sidebar-item-link {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.8);
  margin-bottom: 0.5rem;
}

[data-theme='dark'] .theme-doc-sidebar-item-category > .theme-doc-sidebar-item-link {
  color: rgba(148, 163, 184, 0.8);
}

/* Breadcrumb enhancement */
.breadcrumbs {
  background: linear-gradient(135deg,
    rgba(241, 245, 249, 0.8),
    rgba(226, 232, 240, 0.6));
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

[data-theme='dark'] .breadcrumbs {
  background: linear-gradient(135deg,
    rgba(30, 41, 59, 0.8),
    rgba(51, 65, 85, 0.6));
  border: 1px solid rgba(51, 65, 85, 0.4);
}

.breadcrumbs__item--active .breadcrumbs__link {
  background: linear-gradient(135deg, #25c2a0, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

/* Table of Contents Enhancement */
.table-of-contents {
  background: linear-gradient(135deg,
    rgba(248, 250, 252, 0.8),
    rgba(241, 245, 249, 0.6));
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.6);
}

[data-theme='dark'] .table-of-contents {
  background: linear-gradient(135deg,
    rgba(15, 23, 42, 0.8),
    rgba(30, 41, 59, 0.6));
  border: 1px solid rgba(51, 65, 85, 0.4);
}

.table-of-contents__link {
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.table-of-contents__link:hover {
  background: rgba(37, 194, 160, 0.1);
  border-left-color: #25c2a0;
}

.table-of-contents__link--active {
  background: rgba(37, 194, 160, 0.15);
  border-left-color: #25c2a0;
  font-weight: 600;
}

/* 🔥 Highlighted Navbar Item for Migration Announcement */
.navbar-highlight-link {
  background: linear-gradient(135deg, #e5534b, #dc2626);
  color: #ffffff !important;
  padding: 8px 16px;
  margin-right: 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(229, 83, 75, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-highlight-link:hover {
  background: linear-gradient(135deg, #c6453d, #b91c1c);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229, 83, 75, 0.4);
}
