/* R2Data2 dark theme for Swagger UI */

/* ── Base ── */
body { background: #0d1b2a !important; }
.swagger-ui { background: #0d1b2a; color: #e8edf2; }

/* Catch-all: force borders dark */
.swagger-ui * { border-color: #243447 !important; }

/* ── Topbar ── */
.swagger-ui .topbar { background: #0d1b2a !important; border-bottom: 1px solid #243447 !important; padding: 8px 0; }
.swagger-ui .topbar .download-url-wrapper { display: none; }
.swagger-ui .topbar-wrapper .link { display: none; }

/* ── Main wrapper ── */
.swagger-ui .wrapper { background: #0d1b2a !important; }

/* ── Info block ── */
.swagger-ui .information-container { background: #0d1b2a !important; }
.swagger-ui .info { background: #0d1b2a !important; }
.swagger-ui .info .title { color: #e8edf2 !important; }
.swagger-ui .info p,
.swagger-ui .info li,
.swagger-ui .info a,
.swagger-ui .info span { color: #8fa3b8 !important; }

/* ── Scheme container ── */
.swagger-ui .scheme-container { background: #152336 !important; box-shadow: none !important; padding: 12px 0; }

/* ── Authorize button ── */
.swagger-ui .btn.authorize { background: transparent !important; border: 1px solid #4a6741 !important; color: #8fa3b8 !important; font-weight: 600; border-radius: 6px; }
.swagger-ui .btn.authorize svg { fill: #8fa3b8 !important; }
.swagger-ui .btn.authorize:hover { background: rgba(255,255,255,0.05) !important; }
.swagger-ui .authorization__btn { background: transparent !important; border: none !important; }
.swagger-ui .authorization__btn svg { fill: #8fa3b8 !important; }

/* ── Tags ── */
.swagger-ui .opblock-tag { background: #0d1b2a !important; border-bottom: 1px solid #243447 !important; color: #e8edf2 !important; }
.swagger-ui .opblock-tag:hover { background: #152336 !important; }
.swagger-ui .opblock-tag small { color: #8fa3b8 !important; }
.swagger-ui .opblock-tag-section { background: #0d1b2a !important; }

/* ── Operation blocks ── */
.swagger-ui .opblock { background: #1c2f45 !important; border-radius: 8px !important; margin-bottom: 6px; box-shadow: none !important; }
.swagger-ui .opblock .opblock-summary { background: transparent !important; }
.swagger-ui .opblock-summary-path { color: #e8edf2 !important; }
.swagger-ui .opblock-summary-path__deprecated { color: #8fa3b8 !important; }
.swagger-ui .opblock-summary-description { color: #8fa3b8 !important; }
.swagger-ui .opblock-summary-operation-id { color: #8fa3b8 !important; }

/* GET */
.swagger-ui .opblock.opblock-get { border: 1px solid rgba(46,204,113,0.4) !important; background: rgba(46,204,113,0.04) !important; }
.swagger-ui .opblock.opblock-get .opblock-summary-method { background: #2ecc71 !important; color: #0d1b2a !important; font-weight: 700; border-radius: 4px; }

/* POST */
.swagger-ui .opblock.opblock-post { border: 1px solid rgba(52,152,219,0.4) !important; background: rgba(52,152,219,0.04) !important; }
.swagger-ui .opblock.opblock-post .opblock-summary-method { background: #3498db !important; border-radius: 4px; }

/* ── Expanded operation body ── */
.swagger-ui .opblock-body { background: #152336 !important; }
.swagger-ui .opblock-section { background: #152336 !important; }
.swagger-ui .opblock-section-header { background: #0d1b2a !important; }
.swagger-ui .opblock-section-header h4 { color: #e8edf2 !important; }
.swagger-ui .opblock-section-header label { color: #8fa3b8 !important; }
.swagger-ui .opblock-description-wrapper { background: #152336 !important; }
.swagger-ui .opblock-description-wrapper p { color: #8fa3b8 !important; }

/* ── Parameters ── */
.swagger-ui .parameters-container { background: #152336 !important; }
.swagger-ui .parameters { background: #152336 !important; }
.swagger-ui table { background: transparent !important; }
.swagger-ui table thead tr { background: #0d1b2a !important; }
.swagger-ui table thead tr th { color: #8fa3b8 !important; font-size: 0.8rem; background: #0d1b2a !important; }
.swagger-ui table tbody tr { background: transparent !important; }
.swagger-ui table tbody tr:hover { background: rgba(255,255,255,0.02) !important; }
.swagger-ui table tbody tr td { background: transparent !important; color: #e8edf2 !important; }
.swagger-ui .parameters-col_name { color: #e8edf2 !important; }
.swagger-ui .parameters-col_description { color: #8fa3b8 !important; background: transparent !important; }
.swagger-ui .parameters-col_description p { color: #8fa3b8 !important; }
.swagger-ui .parameter__name { color: #e8edf2 !important; }
.swagger-ui .parameter__type { color: #2ecc71 !important; }
.swagger-ui .parameter__in { color: #8fa3b8 !important; }
.swagger-ui .param-content { background: transparent !important; }

/* ── Labels & text ── */
.swagger-ui label { color: #8fa3b8 !important; }
.swagger-ui p { color: #8fa3b8 !important; }
.swagger-ui h1, .swagger-ui h2, .swagger-ui h3, .swagger-ui h4, .swagger-ui h5 { color: #e8edf2 !important; }
.swagger-ui .tab li { color: #8fa3b8 !important; background: transparent !important; }
.swagger-ui .tab li.active { color: #e8edf2 !important; }
.swagger-ui .tab li button { color: #8fa3b8 !important; background: transparent !important; border: none !important; }
.swagger-ui .tab li.active button { color: #e8edf2 !important; }

/* ── Input fields ── */
.swagger-ui input[type=text],
.swagger-ui input[type=password],
.swagger-ui input[type=search],
.swagger-ui input[type=email],
.swagger-ui textarea,
.swagger-ui select {
  background: #0a1520 !important;
  border: 1px solid #243447 !important;
  color: #e8edf2 !important;
  border-radius: 4px;
}
.swagger-ui input::placeholder,
.swagger-ui textarea::placeholder { color: #475c6e !important; }
.swagger-ui input:focus, .swagger-ui textarea:focus { border-color: #2ecc71 !important; outline: none !important; box-shadow: none !important; }
.swagger-ui .body-param__text { background: #0a1520 !important; color: #e8edf2 !important; }

/* ── Buttons ── */
.swagger-ui .btn { background: transparent !important; color: #e8edf2 !important; border-radius: 5px; box-shadow: none !important; }
.swagger-ui .btn.execute { background: #2ecc71 !important; border: 1px solid #2ecc71 !important; color: #0d1b2a !important; font-weight: 700; }
.swagger-ui .btn.execute:hover { background: #27ae60 !important; border-color: #27ae60 !important; }
.swagger-ui .btn.cancel { border: 1px solid #8fa3b8 !important; color: #8fa3b8 !important; }
.swagger-ui .btn.btn-clear { border: 1px solid #243447 !important; color: #8fa3b8 !important; }
.swagger-ui .try-out__btn { border: 1px solid #4a6741 !important; color: #8fa3b8 !important; background: transparent !important; }
.swagger-ui .try-out__btn:hover { background: rgba(255,255,255,0.05) !important; }

/* ── Responses ── */
.swagger-ui .responses-wrapper { background: #152336 !important; }
.swagger-ui .responses-inner { background: #152336 !important; }
.swagger-ui .response { background: #152336 !important; }
.swagger-ui .response-col_status { color: #e8edf2 !important; font-weight: 600; }
.swagger-ui .response-col_description { background: transparent !important; }
.swagger-ui .response-col_description p { color: #8fa3b8 !important; }
.swagger-ui .response-col_links { color: #8fa3b8 !important; }
.swagger-ui table.responses-table td { background: transparent !important; }
.swagger-ui .live-responses-table .response { background: #1c2f45 !important; }

/* ── Code / response body ── */
.swagger-ui .highlight-code { background: #0a1520 !important; border-radius: 6px; }
.swagger-ui .highlight-code > .microlight { background: #0a1520 !important; color: #a8d8a8 !important; padding: 1rem; display: block; }
.swagger-ui .response-control-media-type { background: transparent !important; }
.swagger-ui .response-control-media-type__accept-message { color: #8fa3b8 !important; }
.swagger-ui .curl-command { background: #0a1520 !important; }
.swagger-ui .curl { color: #8fa3b8 !important; }
.swagger-ui .copy-to-clipboard { background: #152336 !important; }
.swagger-ui .copy-to-clipboard button { background: #1c2f45 !important; border: 1px solid #243447 !important; }

/* ── Models / Schemas ── */
.swagger-ui section.models { background: #152336 !important; border: 1px solid #243447 !important; border-radius: 8px; }
.swagger-ui section.models h4 { color: #e8edf2 !important; }
.swagger-ui section.models .model-container { background: #1c2f45 !important; border: 1px solid #243447 !important; margin: 0 10px 10px; border-radius: 6px; }
.swagger-ui section.models .model-box { background: #1c2f45 !important; }
.swagger-ui .model-box { background: #1c2f45 !important; }
.swagger-ui .model { color: #e8edf2 !important; background: transparent !important; }
.swagger-ui .model-title { color: #e8edf2 !important; }
.swagger-ui .model .property { color: #e8edf2 !important; }
.swagger-ui .model .property.primitive { color: #8fa3b8 !important; }
.swagger-ui .model-toggle { color: #8fa3b8 !important; }
.swagger-ui .model-box-control { background: transparent !important; }
.swagger-ui span.prop-type { color: #8fa3b8 !important; }
.swagger-ui span.prop-format { color: #8fa3b8 !important; }
.swagger-ui .prop-name { color: #e8edf2 !important; }
/* Inner schema tables and object boxes */
.swagger-ui table.model { background: transparent !important; }
.swagger-ui .inner-object { background: #0d1b2a !important; }
.swagger-ui .model .inner-object { background: #0d1b2a !important; }
.swagger-ui .model-deprecated-warning { color: #8fa3b8 !important; }
/* Schema boxes inside response descriptions */
.swagger-ui .response-col_description .model-box { background: #1c2f45 !important; }
.swagger-ui .response-col_description .model { background: #1c2f45 !important; }
.swagger-ui .json-schema-form-item { background: #0d1b2a !important; }
.swagger-ui .schema-model { background: #1c2f45 !important; }
/* Property rows */
.swagger-ui tr.property-row { background: transparent !important; }
.swagger-ui tr.property-row td { background: transparent !important; color: #e8edf2 !important; }
/* Nuke all remaining white backgrounds inside model/schema sections */
.swagger-ui section.models *,
.swagger-ui .model-box *,
.swagger-ui .model * { background-color: transparent !important; }
/* Re-apply the container backgrounds after the nuke */
.swagger-ui section.models { background-color: #152336 !important; }
.swagger-ui section.models .model-container { background-color: #1c2f45 !important; }
.swagger-ui section.models .model-box,
.swagger-ui .model-box { background-color: #1c2f45 !important; }
.swagger-ui .inner-object,
.swagger-ui .model .inner-object { background-color: #0d1b2a !important; }

/* ── Auth modal ── */
.swagger-ui .dialog-ux .backdrop-ux { background: rgba(0,0,0,0.7) !important; }
.swagger-ui .dialog-ux .modal-ux { background: #152336 !important; border: 1px solid #243447 !important; border-radius: 10px; }
.swagger-ui .dialog-ux .modal-ux-header { background: #0d1b2a !important; border-bottom: 1px solid #243447 !important; border-radius: 10px 10px 0 0; }
.swagger-ui .dialog-ux .modal-ux-header h3 { color: #e8edf2 !important; }
.swagger-ui .dialog-ux .modal-ux-header button { color: #8fa3b8 !important; background: transparent !important; }
.swagger-ui .dialog-ux .modal-ux-content { background: #152336 !important; }
.swagger-ui .dialog-ux .modal-ux-content p { color: #8fa3b8 !important; }
.swagger-ui .dialog-ux .modal-ux-content h4 { color: #e8edf2 !important; }
.swagger-ui .auth-container { background: transparent !important; }
.swagger-ui .scopes h2 { color: #e8edf2 !important; }
.swagger-ui .scope-def { color: #8fa3b8 !important; }

/* ── Icons / arrows ── */
.swagger-ui svg { fill: #8fa3b8 !important; }
.swagger-ui .opblock-summary-method svg { fill: currentColor !important; }
.swagger-ui .btn.authorize svg { fill: #2ecc71 !important; }
.swagger-ui .authorization__btn svg { fill: #2ecc71 !important; }

/* ── Links ── */
.swagger-ui a { color: #8fa3b8 !important; }
.swagger-ui a:hover { color: #e8edf2 !important; }
