/* Imperium Docs — Mintlify-style dark theme */
:root {
  --docs-primary: #ff00ed;
  --docs-primary-rgb: 255, 0, 237;
  --docs-primary-light: #ff66f5;
  --docs-primary-dark: #e600d9;
  --docs-bg: #090e10;
  --docs-bg-elevated: #0f1416;
  --docs-border: rgba(255, 255, 255, 0.08);
  --docs-text: #e5e7eb;
  --docs-muted: #9ca3af;
  --docs-sidebar-w: 18rem;
  --docs-sidebar-gap: 2.5rem; /* 40px gutter between nav and content */
  --docs-header-h: 4rem;
  --docs-toc-w: 14rem;
  --docs-success: 34, 197, 94;
  --docs-warning: 245, 158, 11;
}

@media (min-width: 1024px) {
  :root { --docs-header-h: 7rem; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 110%; }
html.dark, .docs-body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background: var(--docs-bg);
  color: var(--docs-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.docs-body.docs-menu-open,
.docs-body.docs-modal-open {
  overflow: hidden;
}

.docs-page-loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05080f;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.docs-page-loader.hidden {
  pointer-events: none;
}
.docs-page-loader.is-hidden {
  opacity: 0;
}
.docs-page-loader-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 0, 237, 0.3);
  border-top-color: var(--docs-primary);
  animation: docs-page-loader-spin 0.8s linear infinite;
}
@keyframes docs-page-loader-spin {
  to { transform: rotate(360deg); }
}

.docs-logo-link { text-decoration: none; }

.imperium-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.imperium-logo-img {
  display: block;
  width: auto;
  height: 2.35rem;
  object-fit: contain;
}

.imperium-logo-sm .imperium-logo-img {
  height: 1.85rem;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 14, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--docs-border);
}
.docs-header-inner { max-width: 90rem; margin: 0 auto; }
.docs-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  height: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
@media (min-width: 1024px) {
  .docs-header-row { padding: 0 3rem; gap: 1rem; }
}
.docs-logo { height: 1.75rem; width: auto; }
.docs-search-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--docs-bg);
  color: var(--docs-muted);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
}
.docs-search-btn kbd {
  margin-left: auto;
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  border: 1px solid var(--docs-border);
  background: rgba(255,255,255,0.04);
}
@media (min-width: 1024px) { .docs-search-btn { display: flex; } }
.docs-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  border: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #ff66f5 0%, #ff00ed 52%, #c400b8 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.docs-back-btn:hover {
  opacity: 0.9;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.18), 0 4px 6px -4px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.docs-back-btn:active {
  transform: scale(0.98);
}
@media (min-width: 1024px) { .docs-back-btn { display: inline-flex; } }

.docs-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: auto;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  color: var(--docs-muted);
  cursor: pointer;
}
.docs-icon-btn + .docs-icon-btn { margin-left: 0.35rem; }
.docs-mobile-menu-btn { margin-left: 0; }
@media (min-width: 1024px) {
  .docs-icon-btn { display: none; }
}

.docs-tabs {
  display: none;
  gap: 1.5rem;
  padding: 0 3rem;
  height: 3rem;
  align-items: center;
}
@media (min-width: 1024px) { .docs-tabs { display: flex; } }
.docs-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--docs-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.docs-tab:hover { color: var(--docs-text); }
.docs-tab-active {
  color: var(--docs-text);
  font-weight: 600;
}
.docs-tab-active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--docs-primary);
  border-radius: 1px;
}

.docs-mobile-nav {
  display: flex;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--docs-muted);
  border-bottom: 1px solid var(--docs-border);
  background: var(--docs-bg);
}
@media (min-width: 1024px) { .docs-mobile-nav { display: none; } }

.docs-shell {
  display: flex;
  max-width: 90rem;
  margin: 0 auto;
  min-height: calc(100vh - var(--docs-header-h));
  gap: 0;
}
@media (min-width: 1024px) {
  .docs-shell { gap: var(--docs-sidebar-gap); }
}
.docs-sidebar {
  display: none;
  width: var(--docs-sidebar-w);
  flex-shrink: 0;
  padding: 1.5rem 0 2rem 3rem;
  position: sticky;
  top: var(--docs-header-h);
  height: calc(100vh - var(--docs-header-h));
  overflow-y: auto;
}
.docs-sidebar.open {
  display: block;
  position: fixed;
  inset: var(--docs-header-h) 0 0 0;
  z-index: 40;
  background: var(--docs-bg);
  padding: 1rem 1.5rem 2rem;
  width: 100%;
}
@media (min-width: 1024px) {
  .docs-sidebar { display: block; }
  .docs-sidebar.open {
    position: sticky;
    inset: auto;
    width: var(--docs-sidebar-w);
    padding: 1.5rem 0 2rem 3rem;
  }
}

.docs-sidebar-mobile-tabs {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--docs-border);
}
@media (min-width: 1024px) {
  .docs-sidebar-mobile-tabs { display: none; }
}

.docs-sidebar-support {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.25rem 0 1.25rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--docs-muted);
  text-decoration: none;
  line-height: 1.4;
}
.docs-sidebar-support:hover { color: var(--docs-text); }
.docs-sidebar-support-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--docs-border);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.docs-sidebar-group { margin-bottom: 1.5rem; }
.docs-sidebar-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--docs-text);
}
.docs-sidebar-link {
  display: block;
  padding: 0.375rem 1rem;
  margin: 1px 0;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  color: var(--docs-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.docs-sidebar-link:hover { color: var(--docs-text); background: rgba(255,255,255,0.04); }
.docs-sidebar-active {
  color: var(--docs-primary) !important;
  background: rgba(var(--docs-primary-rgb), 0.1) !important;
  font-weight: 600;
}
.docs-sidebar-guide { font-weight: 500; }

.docs-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 2rem;
  padding: 2rem 1.5rem 4rem;
}
@media (min-width: 1024px) { .docs-main { padding: 2.5rem 2rem 4rem 0; } }

.docs-article { flex: 1; max-width: 42rem; min-width: 0; }
.docs-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.06) 36%, rgba(255, 255, 255, 0) 52%),
    linear-gradient(180deg, #ffffff 0%, #f4f4f5 48%, #a1a1aa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}
.docs-lead {
  font-size: 1.0625rem;
  color: var(--docs-muted);
  margin: 0 0 2rem;
  line-height: 1.6;
}
.docs-content { font-size: 0.9375rem; line-height: 1.75; color: #d1d5db; }

.docs-h2 { font-size: 1.375rem; font-weight: 600; margin: 2rem 0 1rem; color: #fff; scroll-margin-top: 6rem; }
.docs-h3 { font-size: 1.125rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #fff; scroll-margin-top: 6rem; }
.docs-p { margin: 0 0 1rem; }
.docs-link { color: var(--docs-primary); text-decoration: none; }
.docs-link:hover { text-decoration: underline; }

.docs-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  margin: 0.25rem 0 0.5rem;
  border-radius: 0.75rem;
  border: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #ff66f5 0%, #ff00ed 52%, #c400b8 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}
.docs-cta-btn:hover {
  opacity: 0.92;
  text-decoration: none;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.18), 0 4px 6px -4px rgba(0, 0, 0, 0.12);
}
.docs-cta-btn:active { transform: scale(0.98); }
.docs-divider { border: none; border-top: 1px solid var(--docs-border); margin: 2rem 0; }

.docs-callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.docs-callout-warning {
  background: rgba(var(--docs-warning), 0.08);
  border: 1px solid rgba(var(--docs-warning), 0.25);
}
.docs-callout-check {
  background: rgba(var(--docs-success), 0.08);
  border: 1px solid rgba(var(--docs-success), 0.25);
}
.docs-callout-icon { font-size: 1rem; flex-shrink: 0; }

.docs-card {
  display: flex;
  gap: 0.875rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--docs-border);
  background: rgba(255,255,255,0.02);
  margin: 1rem 0;
}
.docs-card-title { font-weight: 600; color: #fff; margin-bottom: 0.25rem; }
.docs-card-body { font-size: 0.875rem; color: var(--docs-muted); }

.docs-ol, .docs-ul { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.docs-ol li, .docs-ul li { margin: 0.375rem 0; }
.docs-figure { margin: 1.25rem 0; }
.docs-img { border-radius: 0.5rem; border: 1px solid var(--docs-border); max-width: 100%; height: auto; }

.docs-video {
  margin: 1.25rem 0 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--docs-border);
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.docs-video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.docs-columns { display: grid; gap: 0.75rem; margin: 1.5rem 0; }
.docs-columns-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .docs-columns-2 { grid-template-columns: 1fr 1fr; } }
.docs-product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  border: 1px solid var(--docs-border);
  background: rgba(255,255,255,0.02);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.docs-product-card:hover {
  border-color: rgba(var(--docs-primary-rgb), 0.4);
  background: rgba(var(--docs-primary-rgb), 0.06);
}
.docs-product-card svg { color: var(--docs-muted); flex-shrink: 0; }

.docs-step { margin: 2rem 0; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.04); }
.docs-step-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.docs-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: rgba(var(--docs-primary-rgb), 0.15);
  color: var(--docs-primary);
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}
.docs-step-title { font-size: 1.125rem; font-weight: 600; margin: 0; color: #fff; }

.docs-accordions { margin: 1.5rem 0; }
.docs-accordion {
  border: 1px solid var(--docs-border);
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.docs-accordion summary {
  padding: 0.875rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  color: #fff;
}
.docs-accordion summary::-webkit-details-marker { display: none; }
.docs-accordion-body {
  padding: 0 1rem 1rem;
  font-size: 0.875rem;
  color: var(--docs-muted);
  line-height: 1.7;
}

.docs-update {
  border: 1px solid var(--docs-border);
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1rem 0;
}
.docs-update-label {
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--docs-border);
  color: var(--docs-primary);
}
.docs-update-body { padding: 1rem; }

.docs-toc {
  display: none;
  width: var(--docs-toc-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--docs-header-h);
  height: fit-content;
  max-height: calc(100vh - var(--docs-header-h));
  overflow-y: auto;
  padding-top: 0.5rem;
}
@media (min-width: 1280px) { .docs-toc { display: block; } }
.docs-toc-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--docs-muted);
  margin-bottom: 0.75rem;
}
.docs-toc-link {
  display: block;
  padding: 0.25rem 0;
  font-size: 0.8125rem;
  color: var(--docs-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
  transition: color 0.15s, border-color 0.15s;
}
.docs-toc-link:hover, .docs-toc-link.active {
  color: var(--docs-primary);
  border-left-color: var(--docs-primary);
}
.docs-toc-nested { padding-left: 1.25rem; font-size: 0.75rem; }

.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--docs-border);
}
.docs-pager-prev, .docs-pager-next {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--docs-border);
  text-decoration: none;
  color: var(--docs-muted);
  font-size: 0.8125rem;
  max-width: 48%;
  transition: border-color 0.15s, background 0.15s;
}
.docs-pager-next { margin-left: auto; text-align: right; }
.docs-pager-prev:hover, .docs-pager-next:hover {
  border-color: rgba(var(--docs-primary-rgb), 0.35);
  background: rgba(var(--docs-primary-rgb), 0.05);
}
.docs-pager-prev strong, .docs-pager-next strong { color: #fff; font-size: 0.9375rem; }

/* Search */
.docs-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
}
.docs-search-modal {
  position: fixed;
  top: 15vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(32rem, calc(100vw - 2rem));
  background: var(--docs-bg-elevated);
  border: 1px solid var(--docs-border);
  border-radius: 1rem;
  box-shadow: 0 24px 48px rgba(0,0,0,0.5);
  z-index: 110;
  overflow: hidden;
}
.docs-search-modal input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: none;
  border-bottom: 1px solid var(--docs-border);
  background: transparent;
  color: #fff;
  font-size: 0.9375rem;
  font-family: inherit;
  outline: none;
}
.docs-search-results { max-height: 20rem; overflow-y: auto; }
.docs-search-result {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--docs-text);
  text-decoration: none;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.docs-search-result:hover,
.docs-search-result:focus {
  background: rgba(var(--docs-primary-rgb), 0.08);
  outline: none;
}
.docs-search-empty { padding: 2rem; text-align: center; color: var(--docs-muted); font-size: 0.875rem; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125em;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: rgba(255,255,255,0.06);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
