/* ── ServerMate docs theme (matches marketing site: slate-950 + blue-600) ── */

html {
  color-scheme: dark;
}

html.dark {
  --nextra-primary-hue: 217deg;
  --nextra-primary-saturation: 91%;
}

body.sm-docs-body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: #020617 !important;
  color: #f8fafc;
}

/* Top navigation */
.nextra-nav-container {
  background-color: rgb(2 6 23 / 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgb(255 255 255 / 0.05) !important;
  box-shadow: none !important;
}

.nextra-nav-container .nextra-nav-blur {
  background-color: transparent !important;
}

.nextra-nav-container nav {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  gap: 0.75rem;
}

.nextra-nav-container nav > a:first-of-type {
  flex-shrink: 0;
  min-width: 0;
}

@media (min-width: 768px) {
  .nextra-nav-container .nextra-search {
    flex: 1 1 auto;
    max-width: 18rem;
    margin-left: 1.5rem;
    margin-right: 0.5rem;
  }
}

@media (min-width: 640px) {
  .nextra-nav-container nav {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Logo */
.nextra-nav-container nav > a .sm-docs-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: inherit;
}

.sm-docs-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.sm-docs-logo img {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

.sm-docs-logo-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
}

.sm-docs-logo-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  margin-left: 0.125rem;
}

/* Discord chat icon in navbar */
.nextra-nav-container nav > a[href*='discord.gg'] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.nextra-nav-container nav > a[href*='discord.gg']:hover {
  color: #fff;
}

.sm-nav-extra {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.25rem;
}

@media (min-width: 768px) {
  .sm-nav-extra {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .sm-nav-extra {
    gap: 1rem;
    margin-left: 0.5rem;
  }
}

.sm-nav-extra a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}

.sm-nav-extra a:hover {
  color: #fff;
}

.sm-nav-extra .sm-nav-cta {
  display: inline-flex;
  align-items: center;
  background-color: #2563eb;
  color: #fff !important;
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgb(37 99 235 / 0.25);
}

.sm-nav-extra .sm-nav-cta:hover {
  background-color: #3b82f6;
  color: #fff !important;
}

/* Beta / promo banner */
.nextra-banner {
  background: rgb(37 99 235 / 0.1) !important;
  border-bottom: 1px solid rgb(59 130 246 / 0.2) !important;
  color: #bfdbfe !important;
  font-size: 0.875rem;
}

.nextra-banner a {
  color: #93c5fd !important;
  font-weight: 500;
}

.nextra-banner a:hover {
  color: #fff !important;
}

/* Sidebar */
.nextra-sidebar-container {
  background-color: #020617 !important;
  border-right: 1px solid rgb(255 255 255 / 0.05) !important;
}

.nextra-sidebar-container li.active > a,
.nextra-sidebar-container a[data-active='true'] {
  background-color: rgb(37 99 235 / 0.12) !important;
  color: #60a5fa !important;
  border-radius: 0.375rem;
}

.nextra-sidebar-container a:hover {
  background-color: rgb(255 255 255 / 0.04) !important;
  border-radius: 0.375rem;
}

/* Main content */
.nextra-content main {
  color: #cbd5e1;
}

.nextra-content h1,
.nextra-content h2,
.nextra-content h3,
.nextra-content h4 {
  color: #f8fafc;
}

.nextra-content a {
  color: #60a5fa;
}

.nextra-content a:hover {
  color: #93c5fd;
}

.nextra-content code {
  background-color: rgb(255 255 255 / 0.06) !important;
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: 0.25rem;
}

.nextra-content pre {
  background-color: #0f172a !important;
  border: 1px solid rgb(255 255 255 / 0.08) !important;
}

/* Table of contents */
.nextra-toc {
  color: #94a3b8;
}

.nextra-toc a:hover {
  color: #e2e8f0;
}

/* Search */
.nextra-search input {
  background-color: rgb(255 255 255 / 0.05) !important;
  border-color: rgb(255 255 255 / 0.1) !important;
  color: #f8fafc !important;
}

/* Pagination */
.nextra-content .nx-flex.nx-gap-2 a {
  border-color: rgb(255 255 255 / 0.1) !important;
}

/* Custom footer */
.sm-docs-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.05);
  max-width: 72rem;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .sm-docs-footer {
    flex-direction: row;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

.sm-docs-footer-copy {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.sm-docs-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: 0.875rem;
}

.sm-docs-footer-nav a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
}

.sm-docs-footer-nav a:hover {
  color: #fff;
}

footer.nextra-footer .sm-docs-footer {
  width: 100%;
}
