/* Swagger UI con el aire de la app: tinta sobre papel, los tokens del tema claro. */
:root {
    --bg-page: #F7F8FA;
    --bg-surface: #FFFFFF;
    --bg-muted: #F1F2F5;
    --bg-hover: rgba(28, 20, 16, 0.05);
    --border-subtle: rgba(28, 20, 16, 0.06);
    --border-default: rgba(28, 20, 16, 0.1);
    --border-strong: rgba(28, 20, 16, 0.2);
    --text-primary: #1C1410;
    --text-secondary: rgba(28, 20, 16, 0.6);
    --text-tertiary: rgba(28, 20, 16, 0.4);
    --ink: #111827;
    --ink-hover: #000000;
    --method-get: #1D4ED8;
    --method-post: #0E9F6E;
    --method-put: #D97706;
    --method-patch: #6D28D9;
    --method-delete: #DC2626;
    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

html {
    box-sizing: border-box;
    overflow: -moz-scrollbars-vertical;
    overflow-y: scroll;
}
*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font);
}


/** HEADER **/

header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
}

header:before {
    content: none;
}

header #logo {
    position: static;
    transform: none;
    display: block;
    width: 100%;
    max-width: 1460px;
    margin: 0 auto;
    padding: 18px 60px;
}

header #logo img {
    display: block;
    height: 40px;
    width: auto;
    background: none;
}

/**  INCREASE WRAPPER BLOC PADDING **/

#swagger-ui.api-platform .wrapper {
    padding: 0 60px;
}


/**  INFORMATIONS BLOC **/

#swagger-ui.api-platform .information-container.wrapper {
    margin: 0;
    padding: 40px 0 28px;
    width: 100%;
    max-width: 100%;
    background: transparent;
    border-bottom: none;
}

#swagger-ui.api-platform .info {
    width: 100%;
    max-width: 1460px;
    padding: 0 60px;
    margin: 0 auto;
}

#swagger-ui.api-platform .info .title {
    color: var(--text-primary);
    font-family: var(--font);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.swagger-ui .info .title small {
    display: none;
}

.swagger-ui .info hgroup.main {
    margin: 0 0 8px;
}

small .version {
    display: none;
}

#swagger-ui.api-platform .info .description,
#swagger-ui.api-platform .info .description .markdown {
    margin: 0;
    color: var(--text-secondary);
    font-family: var(--font);
    font-weight: 400;
    font-size: 15px;
}

.swagger-ui .markdown p,
.swagger-ui .renderedMarkdown p {
    margin: 0;
    line-height: 1.55;
    color: inherit;
    font-family: var(--font);
}

.swagger-ui a,
.swagger-ui .info a {
    color: var(--ink);
}


/** SERVERS + AUTHORIZE **/

.swagger-ui .scheme-container {
    margin: 0 0 24px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.swagger-ui .servers > label,
.swagger-ui .servers-title {
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
}


/**  TAGS **/

#swagger-ui.api-platform .opblock-tag {
    padding: 10px 8px;
    margin: 0 0 10px;
    border-bottom: 1px solid var(--border-default);
    border-radius: 10px 10px 0 0;
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    transition: background 0.15s ease;
}

#swagger-ui.api-platform .opblock-tag:hover {
    background-color: var(--bg-hover);
    transform: none;
}

.swagger-ui .opblock-tag small,
.swagger-ui .opblock-tag.no-desc span {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}


/**  METHODS BLOCS **/

#swagger-ui.api-platform .opblock {
    margin: 0 0 8px;
    padding: 0;
    overflow: hidden;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-default) !important;
    border-radius: 12px;
    box-shadow: none;
}

#swagger-ui.api-platform .opblock.is-open {
    box-shadow: 0 18px 40px -28px rgba(28, 20, 16, 0.35);
}

/* El style.css del bundle tiñe el borde y las cabeceras por método (con más
   especificidad que esto): aquí van neutros, el color queda solo en la etiqueta. */
#swagger-ui.api-platform .opblock .opblock-summary {
    padding: 6px 8px 6px 6px;
    border-color: var(--border-subtle) !important;
}

#swagger-ui.api-platform .opblock-summary-method {
    min-width: 72px;
    padding: 7px 0;
    border: none;
    border-radius: 8px;
    background-color: var(--text-tertiary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: none;
}

#swagger-ui.api-platform .opblock.opblock-get .opblock-summary-method {
    background-color: var(--method-get);
}

#swagger-ui.api-platform .opblock.opblock-post .opblock-summary-method {
    background-color: var(--method-post);
}

#swagger-ui.api-platform .opblock.opblock-put .opblock-summary-method {
    background-color: var(--method-put);
}

#swagger-ui.api-platform .opblock.opblock-patch .opblock-summary-method {
    background-color: var(--method-patch);
}

#swagger-ui.api-platform .opblock.opblock-delete .opblock-summary-method {
    background-color: var(--method-delete);
}

#swagger-ui.api-platform .opblock.opblock-deprecated .opblock-summary-method {
    background-color: var(--text-tertiary);
}

/* La pestaña activa (Parameters, Responses…) subrayada en tinta, no en el color del método. */
#swagger-ui.api-platform .opblock .tab-header .tab-item.active h4 span:after {
    background: var(--ink);
}

#swagger-ui.api-platform .opblock-summary-path,
#swagger-ui.api-platform .opblock-summary-path__deprecated {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

#swagger-ui.api-platform .opblock-summary-description {
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 400;
}

#swagger-ui.api-platform .opblock .opblock-section-header {
    background-color: var(--bg-muted) !important;
    box-shadow: none;
}

.swagger-ui .opblock .opblock-section-header h4,
.swagger-ui .opblock-description-wrapper p,
.swagger-ui .opblock-external-docs-wrapper p,
.swagger-ui .opblock-title_normal p,
.swagger-ui table thead tr td,
.swagger-ui table thead tr th,
.swagger-ui .parameter__name,
.swagger-ui .response-col_status,
.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5 {
    color: var(--text-primary);
}

.swagger-ui .parameter__type,
.swagger-ui .parameter__in,
.swagger-ui .response-col_links {
    color: var(--text-secondary);
}

.swagger-ui .authorization__btn svg,
.swagger-ui .expand-operation svg,
.swagger-ui .opblock-control-arrow svg {
    fill: var(--text-tertiary);
}

.swagger-ui .expand-operation svg {
    height: 15px;
    width: 15px;
}

#swagger-ui .topbar {
    display: none;
}


/** FORMATS **/

#formats {
    text-align: right;
    font-family: var(--font);
    width: 100%;
    max-width: 1460px;
    padding: 0 60px;
    margin: 0 auto;
}

.response {
    font-family: var(--font);
}


/** BUTTONS **/

#swagger-ui.api-platform .btn {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#swagger-ui.api-platform .btn:hover {
    background-color: var(--bg-hover);
}

#swagger-ui.api-platform .btn.authorize {
    border-color: var(--ink);
    color: var(--ink);
}

#swagger-ui.api-platform .btn.authorize svg {
    fill: var(--ink);
    color: var(--ink);
}

#swagger-ui.api-platform .btn.execute {
    background-color: var(--ink);
    border-color: var(--ink);
    color: #fff;
    animation: none;
}

#swagger-ui.api-platform .btn.execute:hover {
    background-color: var(--ink-hover);
    border-color: var(--ink-hover);
}

#swagger-ui.api-platform .btn.cancel {
    border-color: var(--method-delete);
    color: var(--method-delete);
}

#swagger-ui.api-platform .btn.cancel:hover {
    background-color: rgba(220, 38, 38, 0.08);
}

#swagger-ui.api-platform .execute-wrapper {
    text-align: center;
}

#swagger-ui.api-platform .execute-wrapper .btn {
    width: auto;
    padding: 10px 40px;
}

#swagger-ui.api-platform .btn-group {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

#swagger-ui.api-platform .btn-group .btn {
    padding: 10px 40px;
}


/** INPUTS **/

#swagger-ui.api-platform select,
#swagger-ui.api-platform input[type=text],
#swagger-ui.api-platform input[type=password],
#swagger-ui.api-platform input[type=search],
#swagger-ui.api-platform input[type=email],
#swagger-ui.api-platform textarea {
    border: 1px solid var(--border-default);
    border-radius: 10px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: none;
}

#swagger-ui.api-platform select {
    cursor: pointer;
}

#swagger-ui.api-platform input:focus,
#swagger-ui.api-platform select:focus,
#swagger-ui.api-platform textarea:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.12);
}

#swagger-ui.api-platform button:focus {
    outline: none;
}

#swagger-ui.api-platform button:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}


/** MODELS + DIALOGS **/

.swagger-ui section.models {
    border: 1px solid var(--border-default);
    border-radius: 12px;
    background: var(--bg-surface);
}

.swagger-ui section.models.is-open h4 {
    border-bottom-color: var(--border-subtle);
}

.swagger-ui section.models h4,
.swagger-ui section.models h4 span,
.swagger-ui .model-title,
.swagger-ui .model {
    color: var(--text-primary);
}

.swagger-ui section.models .model-container {
    border-radius: 10px;
    background: var(--bg-muted);
}

.swagger-ui .dialog-ux .modal-ux {
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 30px 70px -30px rgba(28, 20, 16, 0.35);
}

.swagger-ui .dialog-ux .modal-ux-header h3,
.swagger-ui .dialog-ux .modal-ux-content h4,
.swagger-ui .dialog-ux .modal-ux-content p {
    color: var(--text-primary);
}


/** FIX TABS SEPARATOR **/

#swagger-ui.api-platform .tab li:first-of-type:after {
    content: none;
}

#swagger-ui.api-platform .tab li {
    padding: 0 5px;
    border-right: 1px solid var(--border-strong);
}

#swagger-ui.api-platform .tab li:last-of-type {
    border-right: none;
}


/** FONT (fuera la Titillium de Swagger UI; el código sigue en monoespaciada) **/

.swagger-ui,
.swagger-ui .opblock-tag,
.swagger-ui .opblock .opblock-section-header label,
.swagger-ui .opblock .opblock-section-header h4,
.swagger-ui .opblock .opblock-summary-method,
.swagger-ui .opblock-description-wrapper p,
.swagger-ui .tab li,
.swagger-ui .scheme-container .schemes>label,
.swagger-ui .loading-container .loading:after,
.swagger-ui .btn,
.swagger-ui .btn.cancel,
.swagger-ui select,
.swagger-ui label,
.swagger-ui table thead tr td,
.swagger-ui table thead tr th,
.swagger-ui .response-col_status,
.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5,
.swagger-ui .dialog-ux .modal-ux-content h4,
.swagger-ui .dialog-ux .modal-ux-content p,
.swagger-ui .dialog-ux .modal-ux-header h3,
.swagger-ui section.models h4,
.swagger-ui section.models h5,
.swagger-ui .model-title,
.swagger-ui .parameter__name,
.swagger-ui .parameter__type,
.swagger-ui .topbar a,
.swagger-ui .topbar .download-url-wrapper .download-url-button,
.swagger-ui .info .title small pre,
.swagger-ui .scopes h2,
.swagger-ui .errors-wrapper hgroup h4 {
    font-family: var(--font) !important;
}
