/* Shared header with the REST API / MCP Tools switch (index.html and mcp-guide/index.html) */
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 24px;
  background: #1b1b1b;
  font-family: system-ui, sans-serif;
}

.site-nav-logo {
  display: flex;
  flex: none;
}

.site-nav-logo img {
  display: block;
  height: 60px;
  width: auto;
}

.site-nav-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #2c2c2c;
  border-radius: 999px;
}

.site-nav-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: #d0d4da;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-tabs a:hover {
  color: #fff;
  background: #3a3a3a;
}

.site-nav-tabs a[aria-current="page"] {
  background: #fff;
  color: #1b1b1b;
}

.site-nav-tabs a:focus-visible {
  outline: 3px solid #8fb4ff;
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .site-nav {
    gap: 12px;
    padding: 8px 16px;
  }

  .site-nav-logo img {
    height: 44px;
  }

  .site-nav-tabs a {
    padding: 0 12px;
    font-size: 13px;
  }
}

/* Light / dark switch (built by theme.js) */
.theme-switch {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 64px;
  height: 32px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  background: #2c2c2c;
  cursor: pointer;
}

.theme-switch:focus-visible {
  outline: 3px solid #8fb4ff;
  outline-offset: 2px;
}

.theme-switch-icon {
  display: flex;
  z-index: 1;
}

.theme-switch-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #d0d4da;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.theme-switch[aria-checked="true"] .theme-switch-knob {
  transform: translateX(32px);
}

/* The knob sits under the icon for the current theme; draw that icon dark on it. */
.theme-switch[aria-checked="false"] .theme-switch-sun svg,
.theme-switch[aria-checked="true"] .theme-switch-moon svg {
  stroke: #1b1b1b;
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch-knob {
    transition: none;
  }
}
