/* ---------------------------------------------------------
   NAV HEADER TWEAKS
   --------------------------------------------------------- */

.md-nav--primary .md-nav__title {
  display: none;
}

/* ---------------------------------------------------------
   TYPOGRAPHY — HEADINGS
   --------------------------------------------------------- */

.md-typeset h1 {
  font-size: 2.5em;
  line-height: 1.3;
  margin: 0;
}

.md-typeset h2 {
  font-size: 1.65em;
  font-weight: 500;
  line-height: 1.4;
  margin: 1.25em 0 .64em;
  overflow: hidden;

  /* Option A — Flex layout only for H2 */
  display: flex;
  align-items: center;
  flex-wrap: wrap;       /* enables graceful multi-line headings */
  column-gap: .5rem;     /* consistent spacing between H2 text + badge */
  text-wrap: balance;    /* cleaner line breaks */
}

.md-typeset h2 .api-badge {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;        /* flex handles spacing now */
}

.md-typeset h3 {
  font-size: 1.45em;
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.5;
  margin: 1.25em 0 .64em;
  display: flex;
  align-items: center;
  flex-wrap: wrap;       /* enables graceful multi-line headings */
  column-gap: .5rem;     /* consistent spacing between H2 text + badge */
  text-wrap: balance;    /* cleaner line breaks */
}

.md-typeset h3 .api-badge {
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;        /* flex handles spacing now */
}

.md-typeset h4 {
  font-size: 1.2em;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 1.35em;
  margin-bottom: 0.64em;
}

.md-typeset h5 {
  font-size: 1.1em;
  font-weight: 400;
  letter-spacing: -.01em;
  margin-top: 1.35em;
  margin-bottom: 0.54em;
  text-transform: none;
  text-decoration: underline;
  color: #000000DE;
}

.md-typeset h5, h6 {
  text-transform: none;
}

.md-typeset h6 {
  font-size: 1.05em;
  font-weight: 400;
  letter-spacing: -.01em;
  margin-top: 1.35em;
  margin-bottom: 0.54em;
  text-transform: none;
  color: #000000DE;
}

/* ---------------------------------------------------------
   NAV LABEL WEIGHT
   --------------------------------------------------------- */

#__nav_1_label, #__nav_2_label, #__nav_3_label, #__nav_4_label {
  font-weight: 500;
  letter-spacing: -.01em;
}

/* ---------------------------------------------------------
   PARAMETER BLOCKS
   --------------------------------------------------------- */

.api-param-group {
  border-radius: 6px;
  border-style: solid;
  border-color: lightgray;
  border-width: 1px;
  padding: 0.5em;
  margin-top: 0.5em;
}

.param-entry {
  padding: 0.75em 0;
  border-bottom: 1px solid #ddd;
}

.param-entry.level-0 { margin-left: 0; }
.param-entry.level-1 { margin-left: 20px; }

.param-entry:last-child {
  border-bottom: none;
}

.param-name {
  font-weight: bold;
  font-size: 0.95em;
  margin-bottom: 0.25em;
  font-family: Roboto Mono;
}

.param-name.required::after {
  content: "Required";
  color: #d32f2f;
  font-family: Roboto Mono;
  font-size: 0.8em;
  font-weight: normal;
  margin-left: 0.5em;
}

.param-meta {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 0.5em;
}

.param-desc {
  font-size: 0.95em;
  color: #333;
}

/* ---------------------------------------------------------
   COLOR SCHEME (CIS Variant)
   --------------------------------------------------------- */

[data-md-color-scheme="cis"] {
  --md-primary-fg-color: #003B5C;
  --md-primary-fg-color--light: #F2F2F2;
  --md-primary-fg-color--dark: #203947;
  --md-accent-fg-color: #FA9917;
}

/* ---------------------------------------------------------
   BADGE STYLING
   --------------------------------------------------------- */

.api-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
  vertical-align: middle;

  /* badge alignment logic now handled by parent flex */
  margin-top: 0;
  margin-left: auto;
  flex-shrink: 0;
  float: none;
}

/* Insert label from attribute → prevents ToC pollution */
.api-badge::before {
  content: attr(data-label);
}

/* Badge Color Variants */
.api-public {
  background: #ffffff;        /* white background */
  border: 2px solid #ccc;     /* light gray border */
  color: #000000DE;           /* keep existing text color */
}

.api-authenticated {
  background: var(--md-primary-fg-color);
  color: var(--md-accent-bg-color);
}

.api-badge-icon {
  color: inherit;
  font-size: 0.9em;
  vertical-align: text-bottom;
  margin-right: 4px;
  line-height: 1;
}

/* ---------------------------------------------------------
   HTTP METHOD COLORIZATION
   --------------------------------------------------------- */

.md-typeset pre code .http-method {
  font-weight: 700;
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
}

/* Method Colors */
:root {
  --http-get:     #00a2dd;
  --http-post:    #00c896;
  --http-put:     #f2a60c;
  --http-patch:   #a371f7;
  --http-delete:  #e5534b;
  --http-head:    #0ea5e9;
  --http-options: #6b7280;
}

.md-typeset pre code .http-method.get     { color: var(--http-get); }
.md-typeset pre code .http-method.post    { color: var(--http-post); }
.md-typeset pre code .http-method.put     { color: var(--http-put); }
.md-typeset pre code .http-method.patch   { color: var(--http-patch); }
.md-typeset pre code .http-method.delete  { color: var(--http-delete); }
.md-typeset pre code .http-method.head    { color: var(--http-head); }
.md-typeset pre code .http-method.options { color: var(--http-options); }

/* Additional contrast in dark mode */
@media (prefers-color-scheme: dark) {
  .md-typeset pre code .http-method {
    background: rgba(255,255,255,0.08);
  }
}