/* TEAL Documentation - WCAG 2.2 Compliant Color Schema */

:root {
  /* ========================================
     MASTER COLOR PALETTE - 4 Colors Only
     All colors meet WCAG 2.2 AA standards
     ======================================== */

  --color-blue: #05668d;        /* Primary blue - links, interactive (4.51:1) */
  --color-gray: #1a1a1a;        /* Text and borders (16.1:1) */
  --color-green: #2d5016;       /* Success states (8.2:1) */
  --color-red: #991b1b;         /* Error states (7.1:1) */
  --color-white: #ffffff;       /* White - backgrounds */
  --color-gray-light: #d1ecf8;  /* Light gray - hover states */

  /* Typography */
  --font-family-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);

  /* Border Radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--color-white);
  color: var(--color-gray);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Docs pages only - disable body scroll, enable layout scroll */
body:has(.docs-layout) {
  height: 100vh;
  overflow: hidden;
}

/* Offset anchor targets to provide breathing room at top */
.docs-layout .content h1[id],
.docs-layout .content h2[id],
.docs-layout .content h3[id],
.docs-layout .content h4[id] {
  scroll-margin-top: 3rem;
}

/* Header Styles */
header {
  background-color: var(--color-gray-light);
  border-bottom: 1px solid var(--color-gray-light);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

body {
  padding-top: 56px;
}

.header-container {
  max-width: 100%;
  margin: 0;
  padding: 0.5rem 2rem 0.5rem 1rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-gray);
  font-weight: 700;
  font-size: 1.25rem;
  order: 1;
}

header nav {
  order: 2;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--color-blue);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: bold;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
}

nav ul:not(.sidebar-menu) {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.sidebar nav ul {
  gap: 0;
}

header nav a {
  text-decoration: none;
  color: var(--color-gray);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
  position: relative;
}

header nav a:hover {
  color: var(--color-blue);
}

header nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-blue);
  transition: width 0.2s;
}

header nav a:hover::after {
  width: 100%;
}

/* Hamburger toggle - hidden on desktop, shown on mobile */
.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  cursor: pointer;
  order: 3;
  border-radius: var(--radius-md);
}

.nav-toggle-label span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-gray);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Sidebar collapse toggle - hidden on desktop, shown on mobile */
.sidebar-toggle-label {
  display: none;
}

/* Table horizontal-scroll wrapper (from render-table.html hook) */
.table-wrapper {
  max-width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.table-wrapper > .content table,
.table-wrapper > table {
  margin: 0;
}

/* Mermaid diagrams scale to fit, scroll if still wider */
.mermaid {
  max-width: 100%;
  overflow-x: auto;
  text-align: center;
}

.mermaid svg {
  max-width: 100%;
  height: auto;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-white) 0%, var(--color-white) 100%);
  padding: 5rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--color-gray);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-gray);
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--color-gray);
  margin-bottom: 2.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero .subtitle a {
  color: var(--color-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.hero .subtitle a:hover {
  color: var(--color-gray);
  text-decoration: underline;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-blue);
  color: var(--color-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-blue);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-gray);
  border-color: var(--color-gray);
}

.btn-secondary:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

/* Features Section */
.features {
  max-width: 1280px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--color-gray);
}

.python-go-comparison {
  text-align: center;
  margin: 0 auto 3rem;
}

.python-go-comparison img {
  max-width: 600px;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Quick Example Section */
.quick-example {
  background-color: var(--color-gray-light);
  padding: 3rem 2rem;
  margin: 0;
  max-width: 100%;
}

.quick-example-container {
  max-width: 1280px;
  margin: 0 auto;
}

.quick-example h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-gray);
}

.dashboard-preview {
  margin-top: 2rem;
  text-align: center;
}

.dashboard-preview img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-gray-light);
}

/* Open Source Section */
.open-source {
  background-color: var(--color-white);
  padding: 3rem 2rem;
  margin: 0;
  max-width: 100%;
}

.open-source-container {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.open-source h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-gray);
}

.open-source p {
  font-size: 1.125rem;
  color: var(--color-gray);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.open-source-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--color-gray-light);
  border: none;
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--color-white);
  color: var(--color-blue);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--color-gray);
}

.feature-card p {
  color: var(--color-gray);
  line-height: 1.7;
}

/* Content Section */
.content {
  max-width: 1024px;
  margin: 3rem auto;

}

.content img {
  max-width: 800px;
  width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-gray-light);
}

.content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-gray);
}

.content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-gray);
  border-bottom: 2px solid var(--color-white);
  padding-bottom: 0.5rem;
}

.content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--color-gray);
}

.content p {
  margin-bottom: 1rem;
  line-height: 1.7;
  color: var(--color-gray);
}

.content ul, .content ol {
  margin: 1rem 0 1rem 2rem;
  line-height: 1.6;
}

.content li {
  margin-bottom: 0.25rem;
  color: var(--color-gray);
}


.content a {
  color: var(--color-blue);
  text-decoration: underline;
  transition: color 0.2s;
}

.content a:hover {
  color: var(--color-blue);
}

.content blockquote {
  border-left: 4px solid var(--color-blue);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--color-gray);
  font-style: italic;
}

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.content thead {
  background-color: var(--color-blue);
}

.content th {
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-white);
  border-bottom: 2px solid var(--color-gray-light);
}

.content td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-gray-light);
  color: var(--color-gray);
}

.content tbody tr:nth-child(odd) {
  background-color: var(--color-white);
}

.content tbody tr:nth-child(even) {
  background-color: var(--color-gray-light);
}

.content tbody tr:hover {
  background-color: var(--color-gray-light);
  opacity: 0.8;
}

/* Footer */
footer {
  background-color: var(--color-gray);
  color: var(--color-white);
  padding: 3rem 2rem 1.5rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-white);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  opacity: 1;
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* Inline Code */
code {
  background-color: var(--color-gray-light);
  color: var(--color-gray);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* All preformatted blocks (including plain fenced blocks without a
   language, which render as bare <pre>) wrap instead of overflowing */
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Code blocks - remove inline code styling from blocks */
pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.875rem;
}

/* Code in table cells - white background only in light gray rows */
tbody tr:nth-child(even) td code {
  background-color: var(--color-white);
}

/* Code in table headers - white background */
th code {
  background-color: var(--color-white);
}

/* Code Highlight - Teal Theme (SQL, YAML, Go) */
.highlight {
  margin: 1rem 0;
  background-color: #000000;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(20, 184, 166, 0.3);
  box-shadow: 0 4px 6px rgba(20, 184, 166, 0.1);
}

.highlight pre {
  margin: 0;
  padding: 1rem;
  background-color: #000000;
  border: none;
  font-family: var(--font-family-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: #9ca3af;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Syntax Highlighting Colors - Teal Theme */
.highlight .c,    /* Comment */
.highlight .cm,   /* Comment.Multiline */
.highlight .c1,   /* Comment.Single */
.highlight .cs {  /* Comment.Special */
  color: #94a3b8;
  font-style: italic;
}

.highlight .k,    /* Keyword */
.highlight .kc,   /* Keyword.Constant */
.highlight .kd,   /* Keyword.Declaration */
.highlight .kn,   /* Keyword.Namespace */
.highlight .kp,   /* Keyword.Pseudo */
.highlight .kr,   /* Keyword.Reserved */
.highlight .kt {  /* Keyword.Type */
  color: #5eead4;
  font-weight: bold;
}

.highlight .s,    /* String */
.highlight .s1,   /* String.Single */
.highlight .s2,   /* String.Double */
.highlight .se,   /* String.Escape */
.highlight .sh,   /* String.Heredoc */
.highlight .sr,   /* String.Regex */
.highlight .ss {  /* String.Symbol */
  color: #67e8f9;
}

.highlight .m,    /* Number */
.highlight .mi,   /* Number.Integer */
.highlight .mf,   /* Number.Float */
.highlight .mh,   /* Number.Hex */
.highlight .mo {  /* Number.Oct */
  color: #fbbf24;
}

.highlight .n,    /* Name */
.highlight .na,   /* Name.Attribute */
.highlight .nb,   /* Name.Builtin */
.highlight .nc,   /* Name.Class */
.highlight .nf,   /* Name.Function */
.highlight .nv {  /* Name.Variable */
  color: #86efac;
}

.highlight .o,    /* Operator */
.highlight .ow {  /* Operator.Word */
  color: #cbd5e1;
}

.highlight .p {   /* Punctuation */
  color: #cbd5e1;
}

.highlight .err { /* Error */
  color: #fca5a5;
}

/* Chroma Syntax Highlighting - Teal Theme for YAML, Go, and Bash */
.chroma {
  color: #9ca3af;
  background-color: #000000;
}

/* Line wrapper and content */
.chroma .line,
.chroma .cl {
  display: block;
  color: #9ca3af;
}

/* YAML - Keys/Names */
.chroma .nt {  /* Name.Tag (YAML keys) */
  color: #5eead4;
  font-weight: bold;
}

/* YAML - Values (strings) */
.chroma .s,    /* String */
.chroma .s1,   /* String.Single */
.chroma .s2 {  /* String.Double */
  color: #67e8f9;
}

/* YAML - Values (literals, unquoted) */
.chroma .l {   /* Literal */
  color: #86efac;
}

/* YAML/Go - Punctuation */
.chroma .p {   /* Punctuation */
  color: #cbd5e1;
}

/* YAML - Whitespace (keep readable) */
.chroma .w {   /* Whitespace */
  color: #9ca3af;
}

/* Go - Keywords */
.chroma .k,    /* Keyword */
.chroma .kd,   /* Keyword.Declaration (type, func, var, const) */
.chroma .kn {  /* Keyword.Namespace (import, package) */
  color: #5eead4;
  font-weight: bold;
}

/* Go - Types */
.chroma .kt,   /* Keyword.Type (int, string, bool, error, interface) */
.chroma .kc {  /* Keyword.Constant (true, false, nil) */
  color: #2dd4bf;
  font-weight: bold;
}

/* Go - Names (variables, functions) */
.chroma .nx,   /* Name.Other (variables) */
.chroma .nf {  /* Name.Function */
  color: #86efac;
}

/* Go - Operators */
.chroma .o {   /* Operator */
  color: #cbd5e1;
}

/* Go - Strings */
.chroma .s {   /* String */
  color: #67e8f9;
}

/* Go - Numbers */
.chroma .m,    /* Number */
.chroma .mi,   /* Number.Integer */
.chroma .mf {  /* Number.Float */
  color: #fbbf24;
}

/* Go - Comments */
.chroma .c,    /* Comment */
.chroma .c1,   /* Comment.Single */
.chroma .cm {  /* Comment.Multiline */
  color: #94a3b8;
  font-style: italic;
}

/* Bash/Shell - Builtin commands */
.chroma .nb {  /* Name.Builtin (cd, echo, etc.) */
  color: #5eead4;
  font-weight: bold;
}

/* Bash/Shell - Variables */
.chroma .nv,   /* Name.Variable */
.chroma .vg {  /* Variable.Global */
  color: #86efac;
}

/* Bash/Shell - Strings */
.chroma .s,
.chroma .s1,
.chroma .s2,
.chroma .sb,   /* String.Backtick */
.chroma .sc,   /* String.Char */
.chroma .sd,   /* String.Doc */
.chroma .se,   /* String.Escape */
.chroma .sh {  /* String.Heredoc */
  color: #67e8f9;
}

/* Bash/Shell - Numbers */
.chroma .m,    /* Number */
.chroma .mi,   /* Number.Integer */
.chroma .mb,   /* Number.Bin */
.chroma .mh,   /* Number.Hex */
.chroma .mo {  /* Number.Oct */
  color: #fbbf24;
}

/* Selection highlight */
.chroma ::selection {
  background: rgba(94, 234, 212, 0.3);
  color: inherit;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Header stays a single compact row; nav collapses into a dropdown */
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    padding: 0.5rem 1rem;
  }

  .nav-toggle-label {
    display: flex;
  }

  .nav-toggle-label:hover {
    background-color: var(--color-white);
  }

  header nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    margin-top: 0.5rem;
  }

  /* Checkbox hack: reveal nav when the hamburger is toggled */
  .nav-toggle:checked ~ nav {
    display: block;
  }

  header nav ul:not(.sidebar-menu) {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  header nav li {
    list-style: none;
  }

  header nav a {
    display: block;
    padding: 0.6rem 0.25rem;
    border-bottom: 1px solid var(--color-white);
  }

  /* Animate hamburger into an X when open */
  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 3rem 1.25rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero .subtitle {
    font-size: 1.15rem;
  }

  .features {
    margin: 3rem auto;
  }

  .features h2,
  .quick-example h2,
  .open-source h2 {
    font-size: 1.875rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .content h1 {
    font-size: 2rem;
  }

  .content h2 {
    font-size: 1.625rem;
  }

  .content h3 {
    font-size: 1.3rem;
  }
}

/* Documentation Layout with Sidebar */
.docs-layout {
  display: flex;
  height: calc(100vh - 73px);
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-white);
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background-color: var(--color-white);
  border-right: 1px solid var(--color-gray-light);
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav {
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.sidebar nav ul,
.sidebar ul,
.sidebar-nav ul,
nav.sidebar-nav ul {
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.sidebar-section {
  margin: 0;
  padding: 0;
}

.sidebar-section-link {
  display: block;
  padding: 0.375rem 0.5rem 0.375rem 0.5rem;
  color: var(--color-gray);
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 600;
  border: 0;
  margin: 0 0.5rem 0 0.5rem;
  outline: none;
  border-radius: var(--radius-md);
}

.sidebar-section-link:hover {
  color: var(--color-gray);
  background-color: var(--color-gray-light);
  text-decoration: none;
}

.sidebar-section-link.active {
  color: var(--color-gray);
  background-color: transparent;
  font-weight: 600;
}

/* Sidebar submenu */
.sidebar-menu {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

.sidebar-menu-item {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar li {
  margin: 0 !important;
  padding: 0 !important;
}

.sidebar-menu-item a {
  display: block;
  padding: 0.375rem 0.5rem 0.375rem 1.5rem;
  color: var(--color-gray);
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  font-size: 0.875rem;
  line-height: 1;
  font-weight: 400;
  margin: 0 0.5rem 0 0.5rem;
  border-radius: var(--radius-md);
}

.sidebar-menu-item a:hover {
  color: var(--color-gray);
  background-color: var(--color-gray-light);
  text-decoration: none;
}

.sidebar-menu-item a.active {
  color: var(--color-gray);
  background-color: transparent;
  font-weight: 500;
}

/* Content Wrapper */
.content-wrapper {
  flex: 1;
  padding: 2rem 3rem;
  min-width: 0;
  background-color: var(--color-white);
  overflow-y: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Content Section Updates for Docs Layout */
.docs-layout .content {
  margin: 0;
  padding: 0;
  flex: 1;
}

/* Footer in docs layout */
.docs-layout footer {
  margin-top: auto;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-blue);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray);
}

/* Responsive Design for Sidebar */
@media (max-width: 1024px) {
  /* Release the desktop fixed-height / internal-scroll model so the
     whole page scrolls naturally on touch devices */
  body:has(.docs-layout) {
    height: auto;
    overflow: visible;
  }

  .docs-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--color-gray-light);
  }

  .content-wrapper {
    padding: 2rem 1.5rem;
    height: auto;
    overflow: visible;
  }

  /* Collapse the in-page navigation behind an "On this page" toggle
     so it doesn't bury the content on small screens */
  .sidebar-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-gray);
    cursor: pointer;
    user-select: none;
  }

  .sidebar-toggle-chevron {
    transition: transform 0.2s ease;
  }

  .sidebar-toggle:checked ~ .sidebar-toggle-label .sidebar-toggle-chevron {
    transform: rotate(180deg);
  }

  .sidebar-nav {
    display: none;
    padding-bottom: 0.5rem !important;
  }

  .sidebar-toggle:checked ~ .sidebar-nav {
    display: flex;
  }

  /* Wider tap targets for the collapsed menu */
  .sidebar-section-link,
  .sidebar-menu-item a {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  /* Give multi-column tables a sensible minimum so cells stay readable
     (they wrap), and let the wrapper scroll horizontally when narrower */
  .content .table-wrapper > table {
    min-width: 34rem;
  }
}
