:root {
  --docs-bg: #080c1a;
  --docs-panel: #101729;
  --docs-border: rgba(148, 163, 184, 0.18);
  --docs-muted: #94a3b8;
  --docs-accent: #60a5fa;
}

.docs-search-trigger {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8125rem;
  gap: 0.55rem;
  min-height: 2.5rem;
  padding: 0.55rem 0.75rem;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.docs-search-trigger:hover,
.docs-search-trigger:focus-visible {
  background: rgba(96, 165, 250, 0.1);
  border-color: rgba(96, 165, 250, 0.45);
  color: #fff;
  outline: none;
}

.docs-search-trigger kbd,
.docs-search-modal kbd {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0.35rem;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.6875rem;
  line-height: 1;
  padding: 0.25rem 0.38rem;
}

.docs-hero-search {
  justify-content: space-between;
  margin-left: auto;
  margin-right: auto;
  max-width: 32rem;
  padding: 0.85rem 1rem;
  width: 100%;
}

.docs-search-overlay,
.docs-mobile-overlay {
  background: rgba(2, 6, 23, 0.76);
  inset: 0;
  position: fixed;
  z-index: 100;
}

.docs-search-overlay {
  align-items: flex-start;
  display: flex;
  justify-content: center;
  padding: min(12vh, 7rem) 1rem 1rem;
}

.docs-search-modal {
  background: rgba(12, 18, 35, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  max-height: min(78vh, 44rem);
  max-width: 44rem;
  overflow: hidden;
  width: 100%;
}

.docs-search-input-row {
  align-items: center;
  border-bottom: 1px solid var(--docs-border);
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.docs-search-input-row svg {
  color: #64748b;
  flex: none;
  height: 1.25rem;
  width: 1.25rem;
}

.docs-search-input {
  background: transparent;
  border: 0;
  color: #f8fafc;
  flex: 1;
  font-size: 1rem;
  min-width: 0;
  outline: none;
}

.docs-search-input::placeholder { color: #64748b; }

.docs-search-results {
  max-height: calc(min(78vh, 44rem) - 7.5rem);
  overflow-y: auto;
  padding: 0.5rem;
}

.docs-search-result {
  border: 1px solid transparent;
  border-radius: 0.75rem;
  color: inherit;
  display: block;
  padding: 0.75rem 0.8rem;
  text-decoration: none;
}

.docs-search-result:hover,
.docs-search-result[aria-selected="true"] {
  background: rgba(96, 165, 250, 0.09);
  border-color: rgba(96, 165, 250, 0.22);
}

.docs-search-result-title {
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 650;
}

.docs-search-result-section { color: #93c5fd; font-weight: 500; }
.docs-search-result-description { color: var(--docs-muted); font-size: 0.75rem; line-height: 1.5; margin-top: 0.22rem; }
.docs-search-empty { color: var(--docs-muted); font-size: 0.875rem; padding: 2.5rem 1rem; text-align: center; }

.docs-search-footer {
  align-items: center;
  border-top: 1px solid var(--docs-border);
  color: #64748b;
  display: flex;
  font-size: 0.6875rem;
  gap: 0.8rem;
  padding: 0.65rem 1rem;
}

.docs-mobile-actions { align-items: center; display: flex; gap: 0.45rem; }
.docs-mobile-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--docs-border);
  border-radius: 0.65rem;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  height: 2.35rem;
  justify-content: center;
  width: 2.35rem;
}
.docs-mobile-button svg { height: 1.05rem; width: 1.05rem; }

.docs-mobile-overlay { display: flex; justify-content: flex-end; }
.docs-mobile-drawer {
  background: #0b1120;
  border-left: 1px solid var(--docs-border);
  height: 100%;
  max-width: 22rem;
  overflow-y: auto;
  padding: 1rem;
  width: min(88vw, 22rem);
}
.docs-mobile-drawer-header { align-items: center; display: flex; justify-content: space-between; margin-bottom: 0.75rem; }
.docs-mobile-drawer-title { color: #fff; font-size: 1rem; font-weight: 700; }

.docs-navigation .sidebar-section { margin-top: 0.45rem; }
.docs-navigation .sidebar-link { line-height: 1.35; padding-bottom: 0.42rem; padding-top: 0.42rem; }

.docs-on-this-page {
  display: none;
  flex: 0 0 12rem;
  padding-top: 0.5rem;
}
.docs-on-this-page-inner { position: sticky; top: 6rem; }
.docs-on-this-page-title { color: #64748b; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 0.65rem; text-transform: uppercase; }
.docs-toc-link {
  border-left: 1px solid rgba(148, 163, 184, 0.18);
  color: #64748b;
  display: block;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.3rem 0 0.3rem 0.7rem;
  text-decoration: none;
}
.docs-toc-link[data-level="3"] { padding-left: 1.15rem; }
.docs-toc-link:hover,
.docs-toc-link.active { border-left-color: var(--docs-accent); color: #bfdbfe; }

.docs-heading-anchor {
  color: rgba(96, 165, 250, 0.68);
  font-size: 0.8em;
  margin-left: 0.45rem;
  opacity: 0;
  text-decoration: none;
  transition: opacity 150ms ease;
}
h2:hover > .docs-heading-anchor,
h3:hover > .docs-heading-anchor,
.docs-heading-anchor:focus-visible { opacity: 1; }

.docs-back-to-top {
  align-items: center;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--docs-border);
  border-radius: 999px;
  bottom: 1rem;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  height: 2.6rem;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 1rem;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
  width: 2.6rem;
  z-index: 45;
}
.docs-back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.docs-back-to-top svg { height: 1rem; width: 1rem; }
.docs-no-scroll { overflow: hidden !important; }

.docs-table { border-collapse: collapse; min-width: 42rem; width: 100%; }
.docs-table th,
.docs-table td { border-bottom: 1px solid rgba(148, 163, 184, 0.12); padding: 0.75rem 0.9rem; text-align: left; vertical-align: top; }
.docs-table th { color: #94a3b8; font-size: 0.6875rem; letter-spacing: 0.05em; text-transform: uppercase; }
.docs-table td { color: #cbd5e1; font-size: 0.8125rem; line-height: 1.5; }

@media (min-width: 768px) {
  .docs-mobile-actions { display: none; }
}

@media (min-width: 1280px) {
  .docs-on-this-page { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .docs-search-trigger,
  .docs-heading-anchor,
  .docs-back-to-top { transition: none; }
}
