/* TiOLi AGENTIS — Branded Swagger UI Theme
   Dark background with clean white content cards.
   Colours: #061423 bg, #77d4e5 primary, #edc05f accent */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Page background ── */
html, body {
    background-color: #061423 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* ── Hide Swagger's built-in topbar (we use our own branded header) ── */
.swagger-ui .topbar { display: none !important; }

/* ── Info section — on dark bg ── */
.swagger-ui .info { margin: 30px 0 !important; }
.swagger-ui .info .title { color: #ffffff !important; font-weight: 800 !important; font-size: 1.8rem !important; }
.swagger-ui .info .title small { background: #77d4e5 !important; color: #061423 !important; font-weight: 700 !important; }
.swagger-ui .info .title small.version-stamp { background: #edc05f !important; color: #061423 !important; }
.swagger-ui .info .description, .swagger-ui .info .description p { color: #94a3b8 !important; }
.swagger-ui .info a { color: #77d4e5 !important; }

/* ── Scheme container — dark strip ── */
.swagger-ui .scheme-container {
    background: #0f1c2c !important;
    border: 1px solid rgba(119,212,229,0.15) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    padding: 16px !important;
}
.swagger-ui .scheme-container .schemes > label { color: #94a3b8 !important; }

/* ── Tag group headers — on dark bg ── */
.swagger-ui .opblock-tag {
    color: #ffffff !important; font-weight: 700 !important;
    border-bottom: 1px solid rgba(119,212,229,0.12) !important;
}
.swagger-ui .opblock-tag:hover { background: rgba(119,212,229,0.03) !important; }
.swagger-ui .opblock-tag small { color: #64748b !important; }

/* ══════════════════════════════════════════════════════
   CONTENT CARDS — clean white cards on dark background
   Each API operation is a consistent white card
   ══════════════════════════════════════════════════════ */

.swagger-ui .opblock {
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    margin-bottom: 10px !important;
    overflow: hidden !important;
    max-width: 33.333% !important;
}

/* Wrapper constraint — limit overall content width to 1/3 */
.swagger-ui .wrapper {
    max-width: 33.333vw !important;
    min-width: 320px !important;
}

/* Models section also 1/3 */
.swagger-ui section.models {
    max-width: 33.333% !important;
}

/* Scheme container 1/3 */
.swagger-ui .scheme-container {
    max-width: 33.333% !important;
}

/* Method badges — coloured strips */
.swagger-ui .opblock .opblock-summary-method {
    font-weight: 700 !important; border-radius: 4px !important;
    min-width: 70px !important; text-align: center !important;
    font-size: 0.8rem !important;
}

/* GET — teal */
.swagger-ui .opblock.opblock-get { border-left: 4px solid #77d4e5 !important; }
.swagger-ui .opblock.opblock-get .opblock-summary-method { background: #77d4e5 !important; color: #061423 !important; }
.swagger-ui .opblock.opblock-get .opblock-summary { background: rgba(119,212,229,0.05) !important; }

/* POST — green */
.swagger-ui .opblock.opblock-post { border-left: 4px solid #4ade80 !important; }
.swagger-ui .opblock.opblock-post .opblock-summary-method { background: #4ade80 !important; color: #061423 !important; }
.swagger-ui .opblock.opblock-post .opblock-summary { background: rgba(74,222,128,0.05) !important; }

/* PUT — gold */
.swagger-ui .opblock.opblock-put { border-left: 4px solid #edc05f !important; }
.swagger-ui .opblock.opblock-put .opblock-summary-method { background: #edc05f !important; color: #061423 !important; }
.swagger-ui .opblock.opblock-put .opblock-summary { background: rgba(237,192,95,0.05) !important; }

/* DELETE — red */
.swagger-ui .opblock.opblock-delete { border-left: 4px solid #f87171 !important; }
.swagger-ui .opblock.opblock-delete .opblock-summary-method { background: #f87171 !important; color: #ffffff !important; }
.swagger-ui .opblock.opblock-delete .opblock-summary { background: rgba(248,113,113,0.05) !important; }

/* PATCH — purple */
.swagger-ui .opblock.opblock-patch { border-left: 4px solid #a855f7 !important; }
.swagger-ui .opblock.opblock-patch .opblock-summary-method { background: #a855f7 !important; color: #ffffff !important; }

/* Card interior text — dark text on white card */
.swagger-ui .opblock .opblock-summary-path { color: #1e293b !important; font-weight: 500 !important; }
.swagger-ui .opblock .opblock-summary-description { color: #64748b !important; }
.swagger-ui .opblock-body { color: #334155 !important; }
.swagger-ui .opblock-body pre { color: #1e293b !important; }
.swagger-ui .opblock-section-header { background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; box-shadow: none !important; }
.swagger-ui .opblock-section-header h4 { color: #1e293b !important; }
.swagger-ui .opblock-section-header label { color: #64748b !important; }
.swagger-ui .opblock-description-wrapper p { color: #475569 !important; }

/* Parameters inside cards */
.swagger-ui .parameters-col_name { color: #1e293b !important; }
.swagger-ui .parameters-col_description { color: #475569 !important; }
.swagger-ui .parameters-col_description p { color: #475569 !important; }
.swagger-ui .parameter__name { color: #1e293b !important; }
.swagger-ui .parameter__name.required::after { color: #f87171 !important; }
.swagger-ui .parameter__type { color: #0891b2 !important; }
.swagger-ui .parameter__in { color: #94a3b8 !important; }

/* Tables inside cards */
.swagger-ui table thead tr th { color: #475569 !important; border-bottom: 1px solid #e2e8f0 !important; font-weight: 600 !important; }
.swagger-ui table tbody tr td { color: #334155 !important; border-bottom: 1px solid #f1f5f9 !important; }

/* Responses inside cards */
.swagger-ui .response-col_status { color: #0891b2 !important; font-weight: 700 !important; }
.swagger-ui .response-col_description { color: #475569 !important; }

/* Code blocks inside cards — dark inset */
.swagger-ui .highlight-code, .swagger-ui pre.microlight, .swagger-ui .microlight {
    background: #1e293b !important; color: #e2e8f0 !important;
    border-radius: 6px !important; border: 1px solid #334155 !important;
    font-family: 'JetBrains Mono', monospace !important; font-size: 0.8rem !important;
}

/* Inputs inside cards */
.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: #f8fafc !important; border: 1px solid #e2e8f0 !important;
    color: #1e293b !important; border-radius: 4px !important;
}

/* ── Models section — white card ── */
.swagger-ui section.models {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}
.swagger-ui section.models h4 { color: #1e293b !important; border-bottom: 1px solid #e2e8f0 !important; }
.swagger-ui section.models .model-container { background: #f8fafc !important; border-radius: 4px !important; }
.swagger-ui .model-title { color: #0891b2 !important; font-weight: 600 !important; }
.swagger-ui .model { color: #475569 !important; }
.swagger-ui .prop-type { color: #d97706 !important; }

/* ── Buttons — branded ── */
.swagger-ui .btn { border-radius: 4px !important; font-weight: 600 !important; }
.swagger-ui .btn.execute { background: #77d4e5 !important; color: #061423 !important; border: none !important; }
.swagger-ui .btn.execute:hover { background: #5bc4d6 !important; }
.swagger-ui .btn.cancel { background: transparent !important; color: #f87171 !important; border-color: #f87171 !important; }
.swagger-ui .btn.authorize { background: transparent !important; color: #edc05f !important; border: 1px solid #edc05f !important; }
.swagger-ui .btn.authorize:hover { background: rgba(237,192,95,0.1) !important; }
.swagger-ui .btn.authorize svg { fill: #edc05f !important; }
.swagger-ui .authorization__btn svg { fill: #edc05f !important; }
.swagger-ui .try-out__btn { color: #77d4e5 !important; border-color: #77d4e5 !important; }

/* ── Modal — dark overlay, white modal ── */
.swagger-ui .dialog-ux .backdrop-ux { background: rgba(6,20,35,0.8) !important; }
.swagger-ui .dialog-ux .modal-ux {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important; box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
}
.swagger-ui .dialog-ux .modal-ux-header h3 { color: #1e293b !important; }
.swagger-ui .dialog-ux .modal-ux-content { color: #475569 !important; }
.swagger-ui .dialog-ux .modal-ux-content label { color: #1e293b !important; }

/* ── Expand arrows — teal ── */
.swagger-ui .expand-operation svg { fill: #77d4e5 !important; }
.swagger-ui .expand-methods svg { fill: #77d4e5 !important; }
.swagger-ui .arrow { fill: #0891b2 !important; }

/* ── Markdown inside cards ── */
.swagger-ui .renderedMarkdown, .swagger-ui .renderedMarkdown p { color: #475569 !important; }
.swagger-ui .renderedMarkdown a { color: #0891b2 !important; }
.swagger-ui .renderedMarkdown code {
    background: #f1f5f9 !important; color: #d97706 !important;
    padding: 2px 6px !important; border-radius: 3px !important;
    font-family: 'JetBrains Mono', monospace !important;
}

/* ── Misc ── */
.swagger-ui .loading-container .loading::after { color: #77d4e5 !important; }
.swagger-ui .servers > label { color: #94a3b8 !important; }
.swagger-ui .tab li { color: #64748b !important; }
.swagger-ui .tab li.active { color: #0891b2 !important; }
.swagger-ui .response-control-media-type__accept-message { color: #4ade80 !important; }
.swagger-ui .copy-to-clipboard { background: #f1f5f9 !important; border: 1px solid #e2e8f0 !important; border-radius: 4px !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #061423; }
::-webkit-scrollbar-thumb { background: #44474c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #77d4e5; }
