/* BotLinkd API Documentation — dark-only contrast overrides, v13.
   API docs load their base stylesheet after the global theme. Keep this file
   AFTER api-docs.css so the page-local #fff backgrounds do not win the cascade.
   Light mode has zero changes; no JavaScript, form logic or API endpoints touched. */

html[data-botlinkd-theme="dark"] .bl-api {
    --bl-ink: #F4FFF4;
    --bl-copy: #D9EBE5;
    --bl-muted: #AEC9BE;
    --bl-line: rgba(255,255,255,.16);
    --bl-soft: #102B25;
    --bl-accent: #A4F644;
    --bl-accent-dark: #B8F34B;
    --bl-dark: #091714;
    --bl-white: #0F1C19;
    color: #D9EBE5;
}

/* API hero and its two main actions. */
html[data-botlinkd-theme="dark"] .bl-api .bl-api__hero {
    background: radial-gradient(circle at 85% 18%,rgba(164,246,68,.13),transparent 39%),
                linear-gradient(135deg,#071312 0%,#0B2421 66%,#10372E 100%) !important;
}
html[data-botlinkd-theme="dark"] .bl-api :is(h1,h2,h3,h4) { color: #F4FFF4; }
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-api__lead,.bl-doc-heading p) { color: #D9EBE5; }
html[data-botlinkd-theme="dark"] .bl-api .bl-button--secondary {
    background: #152C26 !important;
    border-color: rgba(164,246,68,.34) !important;
    color: #EAF8EF !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-button--secondary:is(:hover,:focus-visible) {
    background: #224A37 !important;
    border-color: #A4F644 !important;
    color: #F5FFF7 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-button--primary,
html[data-botlinkd-theme="dark"] .bl-api .bl-form-actions button[type="submit"] {
    background: #A4F644 !important;
    border-color: #A4F644 !important;
    color: #092218 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-button--primary:is(:hover,:focus-visible),
html[data-botlinkd-theme="dark"] .bl-api .bl-form-actions button[type="submit"]:is(:hover,:focus-visible) {
    background: #92E635 !important;
    color: #092218 !important;
}

/* Every Quick Start step, Related Capability link, standard card and FAQ:
   never show a pale white surface with dark-theme white text. */
html[data-botlinkd-theme="dark"] .bl-api :is(
    .bl-card,.bl-step,.bl-service-link,.bl-faq details,
    .bl-endpoint,.bl-form-panel,.bl-result,.bl-table-wrap
) {
    background: #10251F !important;
    color: #E2F1E9 !important;
    border-color: rgba(255,255,255,.16) !important;
    box-shadow: 0 14px 32px rgba(0,0,0,.13);
}
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-card,.bl-step,.bl-service-link,.bl-faq details):is(:hover,:focus-within) {
    border-color: rgba(164,246,68,.42) !important;
}
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-step h3,.bl-service-link strong,.bl-card h2,.bl-card h3,.bl-faq summary,.bl-field label,.bl-endpoint code,.bl-result__header strong) {
    color: #F4FFF4 !important;
}
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-step p,.bl-service-link small,.bl-card p,.bl-faq details p,.bl-field small) {
    color: #C9E0D4 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-step::before {
    background: #A4F644 !important;
    color: #092218 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-service-link > span,
html[data-botlinkd-theme="dark"] .bl-api .bl-card__icon {
    background: #1D4331 !important;
    color: #A4F644 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-service-link > :last-child {
    color: #A4F644 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-service-link:is(:hover,:focus-visible) {
    background: #19362A !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-card a { color: #B8F34B !important; }
html[data-botlinkd-theme="dark"] .bl-api .bl-faq details[open] {
    background: #10291F !important;
    border-color: rgba(164,246,68,.42) !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-faq details[open] summary {
    color: #A4F644 !important;
}

/* Policy warnings/information keep their semantics, not glaring cream cards. */
html[data-botlinkd-theme="dark"] .bl-api .bl-callout:not(.bl-callout--dark) {
    background: #143027 !important;
    border-color: rgba(164,246,68,.22) !important;
    color: #E0EFE6 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-callout--warning {
    background: #28251A !important;
    border-color: rgba(241,185,65,.43) !important;
    color: #F4E7C6 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-callout--warning > i { color: #F1C45B !important; }
html[data-botlinkd-theme="dark"] .bl-api .bl-callout :is(h2,h3,p) { color: inherit !important; }

/* Documentation sidebar and mobile menu. */
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-api__sidebar,.bl-api__mobile-nav-wrap) {
    background: #0E211B !important;
    color: #E0EEE7 !important;
    border-color: rgba(255,255,255,.15) !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-api__sidebar nav a { color: #CADFD4 !important; }
html[data-botlinkd-theme="dark"] .bl-api .bl-api__sidebar nav a:is(.is-active,:hover,:focus-visible) {
    background: #1A3B2D !important;
    color: #F4FFF4 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-api__sidebar nav a.is-highlighted,
html[data-botlinkd-theme="dark"] .bl-api .bl-api__sidebar-help a { color: #A4F644 !important; }
html[data-botlinkd-theme="dark"] .bl-api .bl-api__mobile-nav-button { color: #F4FFF4 !important; }

/* API Tester tab bar, credentials, form controls and response preview. */
html[data-botlinkd-theme="dark"] .bl-api .bl-tester-tabs button {
    background: #142B24 !important;
    color: #DDEFE5 !important;
    border-color: rgba(255,255,255,.18) !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-tester-tabs button.is-active {
    background: #A4F644 !important;
    color: #092218 !important;
    border-color: #A4F644 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-field :is(input,textarea,select) {
    background: #0A211B !important;
    border-color: rgba(164,246,68,.22) !important;
    color: #F4FFF4 !important;
    color-scheme: dark;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-field :is(input,textarea,select)::placeholder {
    color: #AAC4B6 !important;
    opacity: 1;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-field :is(input,textarea,select):focus-visible {
    outline: 2px solid #A4F644;
    outline-offset: 2px;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-result pre {
    background: #0A1A18 !important;
    color: #DDEEE5 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-result__pill {
    background: #1D3C30 !important;
    color: #D9EBE5 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-result__pill.is-success { color: #C4F691 !important; }
html[data-botlinkd-theme="dark"] .bl-api .bl-result__pill.is-error {
    background: #4D2527 !important;
    color: #FFD3D3 !important;
}

/* Request/response tables, badges and endpoint metadata. */
html[data-botlinkd-theme="dark"] .bl-api .bl-table :is(td,th) {
    border-color: rgba(255,255,255,.13) !important;
    color: #D8E9DF !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-table thead th {
    background: #18382C !important;
    color: #F4FFF4 !important;
}
html[data-botlinkd-theme="dark"] .bl-api :is(.bl-inline-code,.bl-table code) {
    background: #17382B !important;
    color: #C5F78B !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-badge--required {
    background: #18432E !important;
    color: #C5FB8D !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-badge--optional {
    background: #3B311D !important;
    color: #FFE3A3 !important;
}
html[data-botlinkd-theme="dark"] .bl-api .bl-endpoint span {
    background: #A4F644 !important;
    color: #092218 !important;
}

/* Code terminal is intentionally dark in BOTH modes; only dark accents change. */
html[data-botlinkd-theme="dark"] .bl-api .bl-code__tabs button[aria-selected="true"] {
    color: #B8F34B !important;
    background: rgba(164,246,68,.14) !important;
}
