/* mpia docs shell — lean top bar + sidebar footer + theme + responsive. */

body {
  margin: 0;
}

/* --- Top bar --- */
.mpia-topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #e5e7eb;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 2px 10px rgb(0 0 0 / 7%);
  backdrop-filter: blur(12px);
}

.mpia-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: #111;
  text-decoration: none;
}

.mpia-brand-title {
  font: italic 700 22px/1.2 "Chakra Petch", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
}

.mpia-brand-tagline {
  color: #666;
  font: 400 13px/1.2 system-ui, sans-serif;
}

/* Main "mpia" heading — same tech font as the top-left brand, bigger + bold + italic. */
h1.section-header-label {
  font-family: "Chakra Petch", Inter, ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-style: italic;
  font-size: 112px;
}

.language-switcher {
  display: block;
  margin: 10px 12px 4px;
  padding: 4px;
  border: 1px solid #d4d4d4;
  border-radius: 7px;
  background: #fff;
  font: 600 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.language-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.language-switcher a {
  padding: 7px 9px;
  border-radius: 6px;
  color: #404040;
  text-align: center;
  text-decoration: none;
}

.language-switcher a[aria-current="page"] {
  background: #111;
  color: #fff;
}

.language-switcher a:not([aria-current="page"]):hover,
.language-switcher a:not([aria-current="page"]):focus-visible {
  background: #f5f5f5;
  color: #111;
}

.dark-mode .language-switcher {
  border-color: #3a3a3a;
  background: #1a1a1a;
}

.dark-mode .language-switcher a {
  color: #c9c9c9;
}

.dark-mode .language-switcher a[aria-current="page"] {
  background: #fff;
  color: #111;
}

.dark-mode .language-switcher a:not([aria-current="page"]):hover {
  background: #2a2a2a;
  color: #fff;
}

.introduction-section table :is(th, td) br + em {
  color: #6b7280;
  display: inline-block;
  font-size: 0.78em;
  font-weight: 400;
  font-style: normal;
  line-height: 1.35;
  margin-top: 2px;
}

.dark-mode .introduction-section table :is(th, td) br + em {
  color: #a3a3a3;
}

/* The CLI/MCP comparison is the only overview matrix designed to use both
   Scalar introduction columns. Keep surrounding prose at its readable width. */
.scalar-app .introduction-section .markdown table:has(thead th br + em) {
  width: calc(200% + 48px);
  max-width: none;
  table-layout: fixed;
}

.scalar-app .introduction-section .markdown table:has(thead th br + em) :is(th, td) {
  text-align: center;
}

@media (max-width: 800px) {
  .scalar-app .introduction-section .markdown table:has(thead th br + em) {
    width: 100%;
    max-width: 100%;
  }
}

/* --- Sidebar HTTP method colors (match Scalar operation cards) --- */
.sidebar-heading-type--get { color: #4eb3ec !important; }
.sidebar-heading-type--post { color: #00b648 !important; }
.sidebar-heading-type--put { color: #ff8d4d !important; }
.sidebar-heading-type--patch { color: #ffc90d !important; }
.sidebar-heading-type--delete { color: #dd2f2c !important; }
.sidebar-heading-type--options { color: #b191f9 !important; }

/* --- Hide the "Download OpenAPI Document" entry (documentation-only view) --- */
.download-container {
  display: none !important;
}

/* --- CLI command token colors (in endpoint descriptions) --- */
.mpia-cli-name { color: #4eb3ec !important; }    /* A: cli entry (mpia) */
.mpia-cli-module { color: #b191f9 !important; }  /* B: module type (reminders) */
.mpia-cli-action { color: #00b648 !important; }  /* C: action name (permission) */
.mpia-cli-flag { color: #ff8d4d !important; }    /* D: -flag key */
.mpia-cli-value { color: #ffc90d !important; }   /* E: "value" */

.mpia-mobile-search {
  display: none;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #35465b;
  cursor: pointer;
}

/* Scalar reference sits below the fixed top bar. */
body:has(.mpia-topbar) .references-layout,
body:has(.mpia-topbar) .scalar-app {
  top: 48px;
}

/* --- Sidebar footer / injected labels --- */
/* "Open API test tool" button (replaces Scalar's MCP generation row). */
.mpia-api-test-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--scalar-border-color, rgba(0, 0, 0, 0.1));
  border-radius: 6px;
  background: var(--scalar-background-1, #f9f9f9);
  color: var(--scalar-color-1, #1b1b1b);
  font: 400 14px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  cursor: pointer;
}

.mpia-api-test-button:hover {
  background: var(--scalar-background-2, #f1f1f1);
}

/* Version label sits in the same row as the dark-mode toggle, left-aligned. */
.mpia-theme-row {
  gap: 8px;
}

.mpia-version-label {
  flex: 1 1 0%;
  min-width: 0;
  color: var(--scalar-color-2, #777);
  font: 500 11px/1.4 system-ui, sans-serif;
  white-space: nowrap;
}

/* --- Dark mode --- */
body.dark-mode .mpia-topbar,
.dark-mode .mpia-topbar {
  border-bottom-color: #e5e7eb;
  background: rgb(255 255 255 / 98%);
}

body.dark-mode .mpia-brand,
.dark-mode .mpia-brand {
  color: #111;
}

body.dark-mode .mpia-brand-tagline,
.dark-mode .mpia-brand-tagline {
  color: #666;
}

.mpia-group-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-right: 6px;
}

/* --- Topbar actions (GitHub link) --- */
.mpia-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mpia-github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: #111;
  text-decoration: none;
}

.mpia-github-link:hover,
.mpia-github-link:focus-visible {
  background: rgb(53 70 91 / 8%);
}

.dark-mode .mpia-github-link {
  color: #111;
}

.dark-mode .mpia-github-link:hover {
  background: rgb(53 70 91 / 8%);
}
