/* ===== API service filter pills ===== */

.api-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}

.api-filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--color-brand-primary, #76b900);
  background: transparent;
  color: var(--color-brand-primary, #76b900);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.api-filter-pill:hover {
  background: var(--color-brand-primary, #76b900);
  color: #fff;
}

.api-filter-pill.active {
  background: var(--color-brand-primary, #76b900);
  color: #fff;
}

/* ===== Swagger UI: always-on fixes ===== */


.swagger-ui pre.version {
  background-color: unset;
  border: unset;
}

.swagger-ui .info hgroup.main a {
  display: none;
}

table.fixed {
  table-layout: fixed;
  word-break: break-word;
}

/* ===== Swagger UI: dark mode overrides ===== */

/* Broad reset: SwaggerUI hardcodes dark text colors on many specific selectors.
   Override the most common ones in bulk so we don't need to chase every class. */
[data-theme="dark"] .swagger-ui,
[data-theme="dark"] .swagger-ui p,
[data-theme="dark"] .swagger-ui span,
[data-theme="dark"] .swagger-ui div,
[data-theme="dark"] .swagger-ui li,
[data-theme="dark"] .swagger-ui td,
[data-theme="dark"] .swagger-ui th,
[data-theme="dark"] .swagger-ui label,
[data-theme="dark"] .swagger-ui small,
[data-theme="dark"] .swagger-ui h1,
[data-theme="dark"] .swagger-ui h2,
[data-theme="dark"] .swagger-ui h3,
[data-theme="dark"] .swagger-ui h4,
[data-theme="dark"] .swagger-ui h5,
[data-theme="dark"] .swagger-ui h6 {
  color: #e0e0e0;
}

/* Muted secondary text — descriptions, hints, paths */
[data-theme="dark"] .swagger-ui .opblock-summary-description,
[data-theme="dark"] .swagger-ui .opblock-tag small,
[data-theme="dark"] .swagger-ui .parameter__in,
[data-theme="dark"] .swagger-ui .prop-format,
[data-theme="dark"] .swagger-ui .renderedMarkdown p {
  color: #b0b0b0;
}

/* Preserve colored accents — don't let the broad rule stomp these */
[data-theme="dark"] .swagger-ui .opblock-summary-method,
[data-theme="dark"] .swagger-ui .json-schema-2020-12__attribute--primary,
[data-theme="dark"] .swagger-ui .model-title__text,
[data-theme="dark"] .swagger-ui .json-schema-2020-12__title {
  color: inherit;
}

/* Filter input */
[data-theme="dark"] .swagger-ui .filter input {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #555;
}

[data-theme="dark"] .swagger-ui .filter input::placeholder {
  color: #888;
}

/* Operation block backgrounds */
[data-theme="dark"] .swagger-ui .opblock {
  background: #1e1e1e;
  border-color: #444;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-summary {
  border-color: #444;
}

[data-theme="dark"] .swagger-ui .opblock .opblock-summary-description,
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path,
[data-theme="dark"] .swagger-ui .opblock .opblock-summary-path__deprecated {
  color: #ccc;
}

[data-theme="dark"] .swagger-ui .opblock-body,
[data-theme="dark"] .swagger-ui .opblock-description-wrapper,
[data-theme="dark"] .swagger-ui .opblock-external-docs-wrapper {
  background-color: #1a1a1a;
  color: #ccc;
}

/* GET/POST/etc method colors: keep their own colors, just fix summary bg */
[data-theme="dark"] .swagger-ui .opblock.opblock-get .opblock-summary {
  background-color: rgba(97, 175, 254, 0.08);
}
[data-theme="dark"] .swagger-ui .opblock.opblock-post .opblock-summary {
  background-color: rgba(73, 204, 144, 0.08);
}
[data-theme="dark"] .swagger-ui .opblock.opblock-put .opblock-summary {
  background-color: rgba(252, 161, 48, 0.08);
}
[data-theme="dark"] .swagger-ui .opblock.opblock-delete .opblock-summary {
  background-color: rgba(249, 62, 62, 0.08);
}
[data-theme="dark"] .swagger-ui .opblock.opblock-patch .opblock-summary {
  background-color: rgba(80, 227, 194, 0.08);
}

/* "Parameters" / "Responses" section header bars */
[data-theme="dark"] .swagger-ui .opblock-section-header {
  background: #2a2a2a;
  border-bottom-color: #444;
  box-shadow: none;
}

[data-theme="dark"] .swagger-ui .opblock-section-header h4,
[data-theme="dark"] .swagger-ui .opblock-section-header label {
  color: #e0e0e0;
}

/* Parameters and response tables */
[data-theme="dark"] .swagger-ui table thead tr td,
[data-theme="dark"] .swagger-ui table thead tr th {
  background-color: #2a2a2a;
  color: #ccc;
  border-color: #444;
}

/* Table body rows */
[data-theme="dark"] .swagger-ui table tbody tr td {
  background: #1e1e1e;
  border-color: #333;
}

[data-theme="dark"] .swagger-ui table tbody tr:nth-child(even) td {
  background: #222;
}

[data-theme="dark"] .swagger-ui .parameters-col_description,
[data-theme="dark"] .swagger-ui .parameters-col_name,
[data-theme="dark"] .swagger-ui .parameter__name,
[data-theme="dark"] .swagger-ui .parameter__type,
[data-theme="dark"] .swagger-ui .parameter__in {
  color: #ccc;
}

[data-theme="dark"] .swagger-ui .parameter__name.required::after {
  color: #f96565;
}

/* Input fields inside try-it-out */
[data-theme="dark"] .swagger-ui input[type="text"],
[data-theme="dark"] .swagger-ui input[type="password"],
[data-theme="dark"] .swagger-ui input[type="search"],
[data-theme="dark"] .swagger-ui input[type="email"],
[data-theme="dark"] .swagger-ui textarea,
[data-theme="dark"] .swagger-ui select {
  background-color: #2a2a2a;
  color: #e0e0e0;
  border-color: #555;
}

/* Response section */
[data-theme="dark"] .swagger-ui .response-col_status,
[data-theme="dark"] .swagger-ui .response-col_description {
  color: #ccc;
}

[data-theme="dark"] .swagger-ui .responses-inner h4,
[data-theme="dark"] .swagger-ui .responses-inner h5 {
  color: #ccc;
}

/* Code/pre blocks */
[data-theme="dark"] .swagger-ui .highlight-code > .microlight,
[data-theme="dark"] .swagger-ui pre {
  background-color: #1a1a1a;
  color: #ccc;
}

/* Schema section */
[data-theme="dark"] .swagger-ui section.models {
  border-color: #444;
}

[data-theme="dark"] .swagger-ui section.models.is-open h4 {
  border-color: #444;
}

[data-theme="dark"] .swagger-ui .model-title,
[data-theme="dark"] .swagger-ui .model .property,
[data-theme="dark"] .swagger-ui .model .property.primitive {
  color: #ccc;
}

[data-theme="dark"] .swagger-ui .model-box {
  background-color: #1a1a1a;
}

/* Scheme/server selector */
[data-theme="dark"] .swagger-ui .scheme-container {
  background-color: #1e1e1e;
  box-shadow: none;
  border-bottom: 1px solid #444;
}

/* Authorize button */
[data-theme="dark"] .swagger-ui .btn.authorize {
  color: #61affe;
  border-color: #61affe;
}

/* Tag section headers */
[data-theme="dark"] .swagger-ui .opblock-tag {
  border-color: #444;
}

/* Markdown content inside descriptions */
[data-theme="dark"] .swagger-ui .markdown p,
[data-theme="dark"] .swagger-ui .markdown li,
[data-theme="dark"] .swagger-ui .renderedMarkdown p,
[data-theme="dark"] .swagger-ui .renderedMarkdown li {
  color: #ccc;
}

/* ===== Schemas section ===== */

/* "Schemas" header row */
[data-theme="dark"] .swagger-ui section.models h4 {
  color: #e0e0e0;
  border-bottom-color: #444;
}

[data-theme="dark"] .swagger-ui section.models h4 svg {
  fill: #e0e0e0;
}

/* Each schema entry container */
[data-theme="dark"] .swagger-ui .model-container {
  background: #1e1e1e;
  border-color: #444;
  margin: 0 0 4px 0;
}

[data-theme="dark"] .swagger-ui .model-container:hover {
  background: #252525;
}

/* Schema name "pill" button */
[data-theme="dark"] .swagger-ui .model-title__text {
  background: #2a2a2a;
  color: #7ec8e3;
  border-color: #444;
}

/* Chevron toggle arrow */
[data-theme="dark"] .swagger-ui .model-title svg {
  fill: #aaa;
}

/* "Expand all" button */
[data-theme="dark"] .swagger-ui .model-title .model-toggle:after,
[data-theme="dark"] .swagger-ui section.models .model-container > span > span > button {
  color: #aaa;
  border-color: #555;
}

/* "object" / type label */
[data-theme="dark"] .swagger-ui .model-title .prop-type,
[data-theme="dark"] .swagger-ui .model .property.primitive,
[data-theme="dark"] .swagger-ui .model span.prop-type {
  color: #7ec8e3;
}

/* Expanded model content box */
[data-theme="dark"] .swagger-ui .model-box {
  background: #1a1a1a;
}

/* Property names and types inside expanded schema */
[data-theme="dark"] .swagger-ui .model span.prop-name {
  color: #ccc;
}

[data-theme="dark"] .swagger-ui .model .prop-format {
  color: #888;
}

/* Required asterisk */
[data-theme="dark"] .swagger-ui table.model .star {
  color: #f96565;
}

/* Schema toggle arrows inside expanded view */
[data-theme="dark"] .swagger-ui .model .model-toggle:after {
  background: #444;
}

/* Nested object toggle */
[data-theme="dark"] .swagger-ui section.models span > .model-toggle:after {
  background: #555;
}

/* ===== JSON Schema 2020-12 renderer (used in Schemas section) ===== */

/* Schema name accordion buttons — remove the gray pill background */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-accordion {
  background: transparent;
  border: none;
  color: #e0e0e0;
}

[data-theme="dark"] .swagger-ui .json-schema-2020-12-accordion:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Schema/property title text */
[data-theme="dark"] .swagger-ui .json-schema-2020-12__title {
  color: #7ec8e3;
}

/* Arrow icon */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-accordion__icon svg {
  fill: #aaa;
}

/* "Expand all" / "Collapse all" button */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-expand-deep-button {
  background: transparent;
  color: #888;
  border-color: #555;
}

[data-theme="dark"] .swagger-ui .json-schema-2020-12-expand-deep-button:hover {
  color: #ccc;
  border-color: #888;
}

/* Type labels: object, number, boolean, string */
[data-theme="dark"] .swagger-ui .json-schema-2020-12__attribute--primary {
  color: #7ec8e3;
}

[data-theme="dark"] .swagger-ui .json-schema-2020-12__attribute--secondary {
  color: #aaa;
}

/* Body / content area */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-body {
  border-left-color: #444;
}

/* Description text */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-core-keyword__value--secondary {
  color: #bbb;
}

/* Property list items */
[data-theme="dark"] .swagger-ui .json-schema-2020-12-property {
  border-color: #333;
}

/* Embedded (nested) schema articles */
[data-theme="dark"] .swagger-ui .json-schema-2020-12--embedded {
  background: transparent;
  border-color: #333;
}
