/**
 * Swagger UI shell — mirrors @mag/ui ShellNav (Radix Navigation Menu look)
 * without mounting React (API templates are server HTML).
 */

.swagger-magenta-page {
  --magenta-electric: color(display-p3 0.95 0.1 0.4);
  --magenta-electric-fallback: #f91e7a;
  --magenta-scrolled: #d91468;
  --white-pure: #fff;
  --black-true: #1a1a1a;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --font-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Monaco, "Cascadia Code", monospace;
  --paper: #fff8ec;
  --ink: #070507;
  --muted: #6d6268;
  --magenta-p3: color(display-p3 0.97 0 0.92);
  --shadow-md: 0.28rem 0.28rem 0 var(--ink);
}

html.swagger-magenta-page,
body.swagger-magenta-page {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  background: var(--magenta-electric, var(--magenta-electric-fallback));
  color: var(--white-pure);
}

body.swagger-magenta-page .mag-shell {
  min-height: 100vh;
  background: var(--magenta-electric, var(--magenta-electric-fallback));
  font-family: var(--font-primary);
}

/* ── ShellNav parity (fixed solid magenta) ── */
.shell-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  padding: 1rem;
  background: var(--magenta-electric-fallback);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 28px rgba(7, 5, 7, 0.22);
  font-family: var(--font-primary);
}

.shell-nav.is-scrolled {
  background: var(--magenta-scrolled);
  border-bottom-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 36px rgba(7, 5, 7, 0.35);
}

.shell-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shell-nav__logo {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.shell-nav__logo:hover {
  color: #fff;
}

.shell-nav__links {
  display: none;
  flex: 1;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
  align-items: center;
}

@media (min-width: 768px) {
  .shell-nav__links {
    display: flex;
  }
}

.shell-nav__links a {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.1);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.shell-nav__links a:hover {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-1px);
  color: #fff;
}

.shell-nav__links a.is-active {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
}

/* Pill inverse of SiteAuthBar "Workspace Login" / Console */
.shell-nav__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--magenta-electric-fallback);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.shell-nav__cta:hover {
  background: #fff;
  transform: translateY(-1px);
  color: var(--magenta-electric-fallback);
}

/* Mobile link row under logo */
.shell-nav__mobile {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .shell-nav__mobile {
    display: none;
  }
}

.shell-nav__mobile a {
  display: inline-flex;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.shell-nav__mobile a.is-active {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.85);
}

/* ── Swagger panel ── */
#swagger-ui {
  margin: clamp(5.5rem, 12vw, 7rem) clamp(1rem, 3vw, 2.5rem) 3rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-md);
  font-family: var(--font-primary);
}

.swagger-ui .topbar {
  display: none;
}

.swagger-ui .info {
  margin: 1.5rem 0;
}

.swagger-ui .info .title {
  font-family: var(--font-primary);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.swagger-ui .info .description,
.swagger-ui .info p,
.swagger-ui .info li {
  color: var(--muted);
  font-family: var(--font-primary);
}

.swagger-ui .scheme-container {
  background: color-mix(in display-p3, white 60%, var(--paper));
  border: 1px solid var(--ink);
  box-shadow: 0.18rem 0.18rem 0 var(--ink);
  padding: 1rem;
  font-family: var(--font-primary);
}

.swagger-ui .opblock {
  border: 1px solid var(--ink);
  box-shadow: 0.18rem 0.18rem 0 var(--ink);
  border-radius: 0;
  margin: 0.75rem 0;
  font-family: var(--font-primary);
}

.swagger-ui .opblock .opblock-summary {
  border-radius: 0;
}

.swagger-ui .btn {
  border: 1px solid var(--ink);
  box-shadow: 0.18rem 0.18rem 0 var(--ink);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: var(--font-primary);
}

.swagger-ui .btn.authorize {
  background: var(--ink);
  color: var(--paper);
}

.swagger-ui .btn.execute {
  background: var(--magenta-p3);
  color: var(--ink);
}

.swagger-ui .filter-container input[type="text"] {
  border: 1px solid var(--ink);
  box-shadow: 0.18rem 0.18rem 0 var(--ink);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-primary);
}

.swagger-ui section.models {
  border: 1px solid var(--ink);
}

.swagger-ui code,
.swagger-ui pre {
  font-family: var(--font-mono);
}
