/*
 * Swagger UI (/dezvoltatori/api) pe culorile site-ului: folosește variabilele de temă (--bg, --surface, --fg,
 * --muted, --line) și paleta #f30 / #045, deci urmează automat tema luminoasă, cea întunecată și contrastul ridicat.
 * Se încarcă DUPĂ swagger-ui.css.
 */
#swagger-ui .swagger-ui { color: var(--fg); font-family: inherit; }
#swagger-ui .swagger-ui .wrapper { padding: 0; max-width: none; }

/* text: titluri, paragrafe, tabele, etichete */
#swagger-ui .swagger-ui :is(h1, h2, h3, h4, h5, p, li, td, th, label, .info .title, .info .base-url, .opblock-tag, .opblock-tag small,
    .opblock .opblock-summary-path, .opblock .opblock-summary-description, .opblock .opblock-section-header h4,
    .opblock-description-wrapper p, .opblock-external-docs-wrapper p, .opblock-title_normal p, .parameter__name,
    .response-col_status, .response-col_links, .responses-inner h4, .responses-inner h5, .tab li, .btn, .model, .model-title,
    .servers > label, .servers-title, section.models h4, section.models h5, .dialog-ux .modal-ux-header h3,
    .dialog-ux .modal-ux-content p, .dialog-ux .modal-ux-content h4, .renderedMarkdown p, .prop-format) { color: var(--fg); }
#swagger-ui .swagger-ui :is(.info .title, h2, h3, h4, .opblock-tag) { font-family: 'Sora', 'Inter', ui-sans-serif, system-ui, sans-serif; }
#swagger-ui .swagger-ui :is(.parameter__type, .parameter__in, .prop-type, .opblock-tag small, .info .base-url, .model .property,
    .response-control-media-type__accept-message, table thead tr :is(td, th)) { color: var(--muted); }
#swagger-ui .swagger-ui .parameter__name.required::after,
#swagger-ui .swagger-ui .parameter__name.required span { color: var(--color-brand); }

#swagger-ui .swagger-ui a, #swagger-ui .swagger-ui .info a { color: var(--color-brand); }
#swagger-ui .swagger-ui .info { margin: 1.5rem 0; }
#swagger-ui .swagger-ui .info .title small { background: var(--color-petrol); }
#swagger-ui .swagger-ui .info .title small.version-stamp { background: var(--color-brand); }
#swagger-ui .swagger-ui :is(.info code, .renderedMarkdown code, .markdown code) { background: var(--surface-2); color: var(--color-brand); }

/* linii */
#swagger-ui .swagger-ui :is(table thead tr td, table thead tr th, .opblock-tag, .opblock .opblock-section-header,
    section.models, section.models .model-container, section.models.is-open h4, .dialog-ux .modal-ux, .dialog-ux .modal-ux-header,
    .info table, .info table :is(td, th)) { border-color: var(--line); }

/* bara cu serverul și butonul „Authorize” */
#swagger-ui .swagger-ui .scheme-container { background: var(--surface-2); box-shadow: none; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; margin: 0 0 1.5rem; }
#swagger-ui .swagger-ui :is(select, input[type='text'], input[type='password'], input[type='search'], textarea) {
    background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 0.75rem; box-shadow: none;
}
#swagger-ui .swagger-ui .btn { border-color: var(--line); border-radius: 0.75rem; box-shadow: none; background: var(--surface); }
#swagger-ui .swagger-ui .btn.authorize { color: var(--color-brand); border-color: var(--color-brand); background: transparent; }
#swagger-ui .swagger-ui .btn.authorize svg { fill: var(--color-brand); }
#swagger-ui .swagger-ui .btn.execute { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }
#swagger-ui .swagger-ui .btn.cancel { color: var(--color-brand); border-color: var(--color-brand); }

/* operația GET: petrol în loc de albastrul implicit */
#swagger-ui .swagger-ui .opblock { border-radius: 1rem; box-shadow: none; overflow: hidden; }
#swagger-ui .swagger-ui .opblock.opblock-get { background: color-mix(in srgb, var(--color-petrol-300) 12%, var(--surface)); border-color: var(--color-petrol-300); }
#swagger-ui .swagger-ui .opblock.opblock-get .opblock-summary { border-color: var(--color-petrol-300); }
#swagger-ui .swagger-ui .opblock.opblock-get .opblock-summary-method { background: var(--color-petrol); border-radius: 0.6rem; }
#swagger-ui .swagger-ui .opblock.opblock-get .tab-header .tab-item.active h4 span::after { background: var(--color-brand); }
#swagger-ui .swagger-ui .opblock .opblock-section-header { background: var(--surface-2); box-shadow: none; }
#swagger-ui .swagger-ui .opblock-body pre.microlight, #swagger-ui .swagger-ui .highlight-code > .microlight { border-radius: 0.75rem; }

/* scheme (modele) */
#swagger-ui .swagger-ui section.models { border-radius: 1rem; }
#swagger-ui .swagger-ui section.models .model-container { background: var(--surface-2); border-radius: 0.75rem; }
#swagger-ui .swagger-ui section.models .model-container:hover { background: var(--surface-2); }
#swagger-ui .swagger-ui .model-box { background: transparent; }
#swagger-ui .swagger-ui .prop-enum, #swagger-ui .swagger-ui .model .renderedMarkdown p { color: var(--muted); }

/* iconițe (săgeți, lacăt): urmează culoarea textului */
#swagger-ui .swagger-ui svg:not(:root) { fill: var(--fg); }
#swagger-ui .swagger-ui .authorization__btn svg { fill: var(--muted); }
#swagger-ui .swagger-ui .model-toggle::after { filter: none; }
[data-theme='dark'] #swagger-ui .swagger-ui .model-toggle::after,
html.a11y-contrast #swagger-ui .swagger-ui .model-toggle::after { filter: invert(1); }
[data-theme='dark'] #swagger-ui .swagger-ui select,
html.a11y-contrast #swagger-ui .swagger-ui select { background-image: none; }

/* fereastra „Authorize” */
#swagger-ui .swagger-ui .dialog-ux .backdrop-ux { background: rgba(0, 0, 0, 0.6); }
#swagger-ui .swagger-ui .dialog-ux .modal-ux { background: var(--surface); border-radius: 1rem; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6); }
#swagger-ui .swagger-ui .dialog-ux .modal-ux-header .close-modal svg { fill: var(--fg); }
#swagger-ui .swagger-ui .auth-container { border-color: var(--line); }

#swagger-ui .swagger-ui :is(.loading-container .loading::after) { color: var(--muted); }
