@import url('https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Geist+Mono:wght@100..900&display=swap');

/* Brand Premium Palette variables */
:root,
[data-theme="light"] {
  --docs-font-sans: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --docs-font-display: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  /* Light Theme tokens (Slate) */
  --bg-primary: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-subtle: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-active: #0f172a;
  --border-subtle: #e2e8f0;
  --header-bg: #ffffff;
  --accent-color: #0f172a;
  --accent-soft: #f1f5f9;
  --accent-hover: #e2e8f0;
  --install-btn-bg: #0f172a;
  --install-btn-text: #ffffff;
  --install-btn-hover: #1e293b;
  --search-bg: #f1f5f9;
  --search-border: #e2e8f0;
  --kbd-bg: #ffffff;
  --kbd-border: #cbd5e1;
  --code-panel-bg: #f8fafc;
  --code-panel-text: #334155;

  --code-copy-bg: rgba(15, 23, 42, 0.04);
  --code-copy-border: rgba(15, 23, 42, 0.1);
  --code-copy-color: #64748b;
  --code-copy-hover-bg: rgba(15, 23, 42, 0.08);
  --code-copy-hover-color: #0f172a;
  --code-copy-hover-border: rgba(15, 23, 42, 0.2);

  --token-comment: #64748b;
  --token-string: #059669;
  --token-keyword: #d946ef;
  --token-tag: #4f46e5;
  --token-attr: #0284c7;
  
  --shadow-premium: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --docs-font-sans: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --docs-font-display: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    --bg-primary: #0b0f19;
    --bg-sidebar: #090d16;
    --bg-subtle: #0d1322;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-active: #ffffff;
    --border-subtle: #1e293b;
    --header-bg: #090d16;
    --accent-color: #f8fafc;
    --accent-soft: #1e293b;
    --accent-hover: #2d3748;
    --install-btn-bg: rgb(92, 106, 255);
    --install-btn-text: #ffffff;
    --install-btn-hover: rgb(110, 122, 255);
    --search-bg: #1e293b;
    --search-border: #334155;
    --kbd-bg: #334155;
    --kbd-border: #475569;
    --code-panel-bg: #090d16;
    --code-panel-text: #f1f5f9;

    --code-copy-bg: rgba(255, 255, 255, 0.04);
    --code-copy-border: rgba(255, 255, 255, 0.1);
    --code-copy-color: #94a3b8;
    --code-copy-hover-bg: rgba(255, 255, 255, 0.08);
    --code-copy-hover-color: #f8fafc;
    --code-copy-hover-border: rgba(255, 255, 255, 0.2);

    --token-comment: #64748b;
    --token-string: #34d399;
    --token-keyword: #f472b6;
    --token-tag: #818cf8;
    --token-attr: #38bdf8;

    --shadow-premium: none;
  }
}

[data-theme="dark"] {
  --docs-font-sans: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --docs-font-display: "Geist", "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  --bg-primary: #0b0f19;
  --bg-sidebar: #090d16;
  --bg-subtle: #0d1322;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-active: #ffffff;
  --border-subtle: #1e293b;
  --header-bg: #090d16;
  --accent-color: #f8fafc;
  --accent-soft: #1e293b;
  --accent-hover: #2d3748;
  --install-btn-bg: rgb(92, 106, 255);
  --install-btn-text: #ffffff;
  --install-btn-hover: rgb(110, 122, 255);
  --search-bg: #1e293b;
  --search-border: #334155;
  --kbd-bg: #334155;
  --kbd-border: #475569;
  --code-panel-bg: #090d16;
  --code-panel-text: #f1f5f9;

  --code-copy-bg: rgba(255, 255, 255, 0.04);
  --code-copy-border: rgba(255, 255, 255, 0.1);
  --code-copy-color: #94a3b8;
  --code-copy-hover-bg: rgba(255, 255, 255, 0.08);
  --code-copy-hover-color: #f8fafc;
  --code-copy-hover-border: rgba(255, 255, 255, 0.2);

  --token-comment: #64748b;
  --token-string: #34d399;
  --token-keyword: #f472b6;
  --token-tag: #818cf8;
  --token-attr: #38bdf8;

  --shadow-premium: none;
}


* {
  box-sizing: border-box;
}

body, html, input, button, select, textarea {
  font-family: var(--docs-font-sans) !important;
}

body {
  letter-spacing: -0.015em;
  background: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ==========================================================================
   Header / Topbar OVERHAUL
   ========================================================================== */
.docs-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--header-bg);
  backdrop-filter: saturate(190%) blur(16px);
  -webkit-backdrop-filter: saturate(190%) blur(16px);
  padding: 0 24px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.docs-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  max-width: 60%;
}

.docs-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--docs-font-display);
  font-weight: 850;
  font-size: 19px;
  color: var(--text-main);
}

.docs-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--text-main);
  color: var(--bg-primary);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.docs-brand-logo:hover .docs-logo-badge {
  transform: rotate(8deg) scale(1.08);
}

/* Search bar styling - Centered and fully functional */
.docs-search-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  border-radius: 8px;
  padding: 6px 12px;
  width: 320px;
  height: 36px;
  z-index: 1100;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-search-bar:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--accent-soft);
  width: 380px;
}

.docs-search-icon {
  font-size: 16px;
  color: var(--text-muted);
}

.docs-search-input {
  border: 0;
  background: transparent;
  width: 100%;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text-main);
  outline: none;
}
.docs-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}

.docs-search-kbd {
  font-family: inherit;
  font-size: 10px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-muted);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: opacity 0.15s ease;
}

.docs-search-bar:focus-within .docs-search-kbd {
  opacity: 0;
  pointer-events: none;
}

/* Search Dropdown Results Panel */
.docs-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  z-index: 1200;
}

[data-theme="dark"] .docs-search-results {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.docs-search-item {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
}

.docs-search-item:last-child {
  border-bottom: 0;
}

.docs-search-item:hover,
.docs-search-item.active {
  background: var(--accent-soft);
}

.docs-search-item-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 3px;
}

.docs-search-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
}

.docs-search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

.docs-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.docs-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}
.docs-icon-link span.mdi {
  font-size: 18px;
}
.docs-icon-link:hover {
  color: var(--text-main);
}

/* Premium black solid install button */
.docs-btn-install {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--install-btn-bg);
  color: var(--install-btn-text);
  border-radius: 99px;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.docs-btn-install:hover {
  background: var(--install-btn-hover);
  transform: translateY(-1px);
}
.docs-btn-install span.mdi {
  font-size: 14px;
}

/* Theme Toggle styles */
.docs-theme-toggle {
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: background-color 0.2s, color 0.2s;
}
.docs-theme-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-color);
}

/* Sun/Moon visibility depending on data-theme */
.docs-theme-sun { display: inline-block; }
.docs-theme-moon { display: none; }

[data-theme="dark"] .docs-theme-sun { display: none; }
[data-theme="dark"] .docs-theme-moon { display: inline-block; }

/* RTL Toggle styles */
.docs-rtl-toggle {
  background: transparent;
  border: 1px solid var(--border-base);
  width: 38px;
  height: 36px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  padding: 0;
  line-height: 1;
}
.docs-rtl-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent-color);
  border-color: transparent;
}

.docs-rtl-text-ltr { display: inline-block; }
.docs-rtl-text-rtl { display: none; }

[dir="rtl"] .docs-rtl-text-ltr { display: none; }
[dir="rtl"] .docs-rtl-text-rtl { display: inline-block; }

.docs-mobile-menu-btn {
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
}

/* ==========================================================================
   Secondary Tabs Navigation (Sub-Tabs)
   ========================================================================== */
.docs-sub-tabs {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1040;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.docs-tabs-scroll {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
.docs-tabs-scroll::-webkit-scrollbar {
  display: none; /* Safari/Chrome */
}

.docs-tab-item {
  display: inline-flex;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  position: relative;
  /* Hover links change colors smoothly with no position translation shifting! */
  transition: color 0.2s ease, border-color 0.2s ease;
}

.docs-tab-item:hover {
  color: var(--text-main);
}

.docs-tab-item.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
  font-weight: 700;
}

/* ==========================================================================
   Main Shell Layout Structure
   ========================================================================== */
.docs-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 240px;
  min-height: 100vh;
  padding-top: 112px; /* Header 64px + Sub-Tabs 48px */
  background: var(--bg-primary);
  transition: background-color 0.3s ease;
}

/* Backdrop for Mobile Overlay */
.docs-backdrop {
  display: none;
}

/* ==========================================================================
   1st Column: Left Sidebar
   ========================================================================== */
.docs-sidebar {
  position: sticky;
  top: 112px;
  height: calc(100vh - 112px);
  overflow-y: auto;
  background: var(--bg-sidebar);
  padding: 32px 24px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Custom autohide scrollbars for premium UX */
.docs-sidebar,
.docs-toc-sidebar {
  scrollbar-width: none; /* Firefox: hide by default */
  -ms-overflow-style: none; /* IE/Edge */
}

.docs-sidebar::-webkit-scrollbar,
.docs-toc-sidebar::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb,
.docs-toc-sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.docs-sidebar:hover,
.docs-toc-sidebar:hover {
  scrollbar-width: thin; /* Firefox: thin scrollbar on hover */
}

.docs-sidebar:hover::-webkit-scrollbar-thumb,
.docs-toc-sidebar:hover::-webkit-scrollbar-thumb {
  background: var(--border-base);
}

.docs-group {
  margin-bottom: 24px;
}

.docs-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-main);
  padding: 4px 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease;
}
.docs-group-toggle:hover {
  color: var(--accent-color);
}

.docs-group-icon {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform .2s ease;
}

.docs-group[data-collapsed="true"] .docs-group-icon {
  transform: rotate(-90deg);
}

.docs-group[data-collapsed="true"] .docs-nav {
  display: none;
}

.docs-nav {
  display: grid;
  gap: 4px;
  padding: 6px 0;
}

.docs-nav a {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  border-radius: 6px;
  padding: 6px 12px;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  /* Hover links change colors smoothly with no position translation shifting! */
  transition: color 0.18s ease, background-color 0.18s ease;
}

.docs-nav a:hover {
  color: var(--text-main);
  background: var(--accent-soft);
}

/* Beautiful highlighted active page tab style (no position shift) */
.docs-nav a[aria-current="page"] {
  color: var(--accent-color);
  background: var(--accent-soft);
  font-weight: 700;
}

/* ==========================================================================
   2nd Column: Main Content area
   ========================================================================== */
.docs-content-wrapper {
  overflow-y: auto;
  min-width: 0;
}

.docs-main {
  max-width: 960px;
  padding: 48px 56px 96px;
  outline: 0;
  margin: 0 auto;
}

.docs-lead {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 32px;
}

.docs-main h1 {
  font-family: var(--docs-font-display);
  font-size: 38px;
  font-weight: 850;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.docs-main h2 {
  font-family: var(--docs-font-display);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 44px 0 16px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  letter-spacing: -0.015em;
}

.docs-main h3 {
  font-family: var(--docs-font-display);
  font-size: 20px;
  font-weight: 750;
  line-height: 1.3;
  margin: 32px 0 12px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.docs-main p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.68;
}

.docs-main hr {
  border: 0;
  height: 1px;
  background: var(--border-subtle);
  margin: 40px 0;
}

.docs-main code:not(.docs-code code) {
  border-radius: 6px;
  background: var(--search-bg);
  padding: 3px 6px;
  color: var(--accent-color);
  font-size: .88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.docs-main ul,
.docs-main ol {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.68;
  padding-inline-start: 20px;
}

.docs-main li {
  margin-bottom: 8px;
}

.docs-main .docs-preview li {
  margin-bottom: 0 !important;
}

.docs-loading {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Interactive showrooms */
/* Interactive showrooms (Browser Mockup style) */
.docs-preview {
  position: relative;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-primary);
  padding: 56px 24px 24px;
  margin: 24px 0 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .docs-preview {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

.docs-preview::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--search-bg);
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
}

.docs-preview::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56; /* macOS red dot */
  box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #27c93f; /* yellow and green dots */
}

[dir="rtl"] .docs-preview::after {
  left: auto;
  right: 16px;
  box-shadow: -16px 0 0 #ffbd2e, -32px 0 0 #27c93f;
}

.docs-preview .row {
  margin-left: 0;
  margin-right: 0;
}

.docs-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Beautiful Code Panels styling with Copy Button & Syntax Highlighting */
.docs-code-wrapper {
  position: relative;
  margin: 24px 0 32px;
  direction: ltr !important;
  text-align: left !important;
}

.docs-code-wrapper .docs-code {
  margin: 0;
}

code {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  direction: ltr !important;
  text-align: left !important;
}

.docs-code {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--code-panel-bg);
  color: var(--code-panel-text);
  padding: 20px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 13.5px;
  line-height: 1.65;
  white-space: pre;
  border: 1px solid var(--border-subtle);
  direction: ltr !important;
  text-align: left !important;
}

.docs-code-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--code-copy-border);
  background: var(--code-copy-bg);
  color: var(--code-copy-color);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
}

.docs-code-copy:hover {
  background: var(--code-copy-hover-bg);
  color: var(--code-copy-hover-color);
  border-color: var(--code-copy-hover-border);
}

.docs-code-copy:active {
  transform: scale(0.96);
}

.docs-code-copy.copied {
  background: rgba(34, 197, 94, 0.15);
  color: #34d399;
  border-color: rgba(34, 197, 94, 0.3);
}

/* Syntax Highlighting Tokens (Tokyo Night/Slate inspired) */
.token.comment {
  color: var(--token-comment);
  font-style: italic;
}

.token.string {
  color: var(--token-string);
}

.token.keyword {
  color: var(--token-keyword);
  font-weight: 600;
}

.token.tag {
  color: var(--token-tag);
  font-weight: 600;
}

.token.attr {
  color: var(--token-attr);
}

/* ==========================================================================
   3rd Column: Table of Contents (Right)
   ========================================================================== */
.docs-toc-sidebar {
  position: sticky;
  top: 112px;
  height: calc(100vh - 112px);
  overflow-y: auto;
  background: var(--bg-sidebar);
  padding: 32px 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.docs-toc-sidebar.empty {
  display: none !important;
}

.docs-toc-sticky {
  position: sticky;
  top: 0;
}

.docs-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--docs-font-display);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: .08em;
  margin-bottom: 16px;
}

.docs-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-inline-start: 1px solid var(--border-subtle);
  padding-inline-start: 2px;
}

.docs-toc-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-inline-start: 2px solid transparent;
  margin-inline-start: -2px;
  /* Hover links change colors smoothly with no position translation shifting! */
  transition: color 0.15s ease, border-color 0.15s ease;
}

.docs-toc-link:hover {
  color: var(--text-main);
}

.docs-toc-link.active {
  color: var(--accent-color);
  border-inline-start-color: var(--accent-color);
  font-weight: 700;
}

.docs-toc-h3 {
  padding-inline-start: 22px;
  font-size: 11.5px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1120px) {
  /* Hide TOC sidebar on mid-sized viewports */
  .docs-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .docs-toc-sidebar {
    display: none !important;
  }
}

@media (max-width: 860px) {
  body.docs-menu-open {
    overflow: hidden;
  }

  .docs-header {
    height: 56px;
    padding: 0 16px;
  }
  
  .docs-sub-tabs {
    top: 56px;
    height: 44px;
    padding: 0 16px;
  }

  .docs-logo-text {
    display: none; /* save topbar space */
  }

  .docs-search-bar {
    width: 170px;
    height: 32px;
  }
  .docs-search-kbd {
    display: none;
  }

  .docs-header-right .docs-icon-link {
    display: none; /* hide github/discord texts */
  }

  .docs-btn-install {
    display: none;
  }

  .docs-mobile-menu-btn {
    display: flex;
  }

  /* Backdrop Overlay for mobile slideout sidebar */
  .docs-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1080;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
  }
  
  body.docs-menu-open .docs-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .docs-shell {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }

  .docs-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 1090;
    width: 100%;
    height: auto;
    max-height: min(75vh, 600px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-right: 0;
    border-top: 1px solid var(--border-subtle);
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    padding: 24px 20px 36px;
  }

  body.docs-menu-open .docs-sidebar {
    transform: translateY(0);
  }

  .docs-main {
    padding: 32px 16px 64px;
  }

  .docs-main h1 {
    font-size: 30px;
  }

  .docs-main h2 {
    font-size: 22px;
  }
}

.docs-main .list-group {
  padding: 0;
  list-style: none;
  font-size: inherit;
  line-height: inherit;
}

.docs-main .list-group-item {
  margin-block-end: 0;
}

/* Premium End-of-Content Footer */
.docs-footer-poll {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.docs-poll-text {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.docs-poll-buttons {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.docs-poll-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.docs-poll-btn:hover {
  background: var(--accent-soft);
  border-color: var(--text-muted);
  color: var(--text-active);
}

.docs-poll-btn:active {
  background: var(--accent-hover);
}

.docs-poll-btn.voted {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgb(16, 185, 129);
  color: rgb(16, 185, 129);
  cursor: default;
  pointer-events: none;
}

.docs-poll-thanks {
  font-size: 14px;
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.docs-footer-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.docs-footer-nav-prev,
.docs-footer-nav-next {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 48%;
}

.docs-footer-nav-prev {
  align-items: flex-start;
}

.docs-footer-nav-next {
  align-items: flex-end;
}

.docs-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.docs-nav-link {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.docs-nav-link:hover {
  color: var(--install-btn-bg);
}

.docs-footer-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}

.docs-footer-socials {
  display: flex;
  flex-direction: row;
  gap: 16px;
}

.docs-footer-icon-link {
  font-size: 20px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.docs-footer-icon-link:hover {
  color: var(--text-main);
}

.docs-footer-powered {
  font-size: 13px;
  color: var(--text-muted);
}

.docs-powered-link {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease-in-out;
}

.docs-powered-link:hover {
  text-decoration: underline;
  color: var(--install-btn-bg);
}

@media (max-width: 575.98px) {
  .docs-footer-poll {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  
  .docs-footer-nav {
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
  }
  
  .docs-footer-nav-prev {
    width: 48%;
    align-items: flex-start;
  }
  
  .docs-footer-nav-next {
    width: 48%;
    align-items: flex-end;
  }
  
  .docs-footer-meta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
  }
}

/* RTL Icon Mirroring for Navigation and Chevrons */
[dir="rtl"] .mdi-chevron-right,
[dir="rtl"] .mdi-chevron-double-right,
[dir="rtl"] .mdi-arrow-right,
[dir="rtl"] .mdi-chevron-left,
[dir="rtl"] .mdi-chevron-double-left,
[dir="rtl"] .mdi-arrow-left {
  transform: scaleX(-1);
  display: inline-block;
}
