/*
 * Tema Partner Solution per le pagine Swagger (brandkit partnersolutionskills/partnersolution-brandkit),
 * lo stesso della dashboard /applicazioni/ (client/applicazioni/src/tema.css).
 * Va caricato DOPO swagger-ui.css: ne ripete i selettori con la stessa specificità, quindi vince per ordine.
 * Il bundle vendorizzato non si tocca. Font locali (nessuna chiamata a Google Fonts).
 *
 * - Nunito per titoli ed enfasi, Varela Round per il testo (ha solo il peso 400: niente grassetto sintetico).
 * - Giallo #FECA16 per azioni e accenti, testi neri; il giallo non è mai colore di testo su fondo chiaro.
 * - I colori dei metodi HTTP (GET, POST, ...) restano quelli di Swagger: sono semantici.
 * - Percorsi, codice ed esempi restano in monospazio.
 */
@import url('./fonts.css');

:root {
  --ps-yellow: #feca16;
  --ps-yellow-hover: #fbe9b2;
  --ps-yellow-soft: #fff6d6;
  --ps-ink: #030303;
  --ps-muted: #4a4a4a;
  --ps-line: #e3e3e3;
  --ps-font-heading: 'Nunito', Arial, sans-serif;
  --ps-font-body: 'Varela Round', Arial, sans-serif;
  --ps-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body { background: #fff; color: var(--ps-ink); font-family: var(--ps-font-body); }

/* Barra comune a tutte le pagine: bianca, logo originale e riga gialla. */
.ps-barra {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 10px 20px; background: #fff; border-bottom: 4px solid var(--ps-yellow);
  color: var(--ps-ink); font-family: var(--ps-font-body);
}
.ps-barra .ps-logo { display: flex; align-items: center; }
.ps-barra .ps-logo img { display: block; height: 36px; width: auto; }
.ps-barra .ps-titolo { font: 800 20px/1.2 var(--ps-font-heading); color: var(--ps-ink); }
.ps-barra a { color: var(--ps-ink); text-decoration: none; font-size: 15px; border-bottom: 3px solid transparent; }
.ps-barra a:hover { border-bottom-color: var(--ps-yellow); }
.ps-barra .ps-azioni { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ps-barra button {
  padding: 5px 14px; font: 400 14px var(--ps-font-body); color: var(--ps-ink);
  background: #fff; border: 2px solid var(--ps-ink); border-radius: 999px; cursor: pointer;
}
.ps-barra button:hover { background: var(--ps-yellow); border-color: var(--ps-yellow); }
@media (max-width: 560px) {
  .ps-barra .ps-logo img { height: 30px; }
  .ps-barra .ps-titolo { font-size: 17px; flex-basis: 100%; }
  .ps-barra .ps-azioni { margin-left: 0; }
}

:focus-visible { outline: 3px solid var(--ps-ink); outline-offset: 2px; }

/* ---- Swagger UI: font ---- */
.swagger-ui,
.swagger-ui button, .swagger-ui input, .swagger-ui optgroup, .swagger-ui select, .swagger-ui textarea,
.swagger-ui .system-sans-serif,
.swagger-ui .opblock-tag small,
.swagger-ui .opblock .opblock-section-header>label,
.swagger-ui .opblock .opblock-summary-description,
.swagger-ui .tab li,
.swagger-ui .opblock-description-wrapper, .swagger-ui .opblock-external-docs-wrapper, .swagger-ui .opblock-title_normal,
.swagger-ui .opblock-description-wrapper p, .swagger-ui .opblock-external-docs-wrapper p, .swagger-ui .opblock-title_normal p,
.swagger-ui .response-col_status, .swagger-ui .response-col_links,
.swagger-ui .download-contents,
.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 .dialog-ux .modal-ux-content p,
.swagger-ui .model-deprecated-warning,
.swagger-ui .servers>label,
.swagger-ui table thead tr td, .swagger-ui table thead tr th,
.swagger-ui .parameter__name,
.swagger-ui .topbar a,
.swagger-ui .topbar .download-url-wrapper .download-url-button,
.swagger-ui .info li, .swagger-ui .info p, .swagger-ui .info table,
.swagger-ui .info a,
.swagger-ui .markdown p, .swagger-ui .renderedMarkdown p {
  font-family: var(--ps-font-body);
}

.swagger-ui .info .title,
.swagger-ui .info h1, .swagger-ui .info h2, .swagger-ui .info h3, .swagger-ui .info h4, .swagger-ui .info h5,
.swagger-ui .opblock-tag,
.swagger-ui .opblock .opblock-section-header h4,
.swagger-ui .opblock-description-wrapper h4, .swagger-ui .opblock-external-docs-wrapper h4, .swagger-ui .opblock-title_normal h4,
.swagger-ui .responses-inner h4, .swagger-ui .responses-inner h5,
.swagger-ui section h3,
.swagger-ui .dialog-ux .modal-ux-content h4,
.swagger-ui .dialog-ux .modal-ux-header h3,
.swagger-ui section.models h4, .swagger-ui section.models h5,
.swagger-ui .model-title,
.swagger-ui .scopes h2,
.swagger-ui .errors-wrapper hgroup h4,
.swagger-ui .opblock .opblock-summary-method,
.swagger-ui strong, .swagger-ui b {
  font-family: var(--ps-font-heading);
}
.swagger-ui .info .title { font-weight: 800; color: var(--ps-ink); }
.swagger-ui .opblock-tag { font-weight: 800; color: var(--ps-ink); }
.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-path__deprecated,
.swagger-ui .opblock .opblock-summary-operation-id { font-family: var(--ps-font-mono); }

/* ---- Swagger UI: colori ---- */
.swagger-ui, .swagger-ui .info li, .swagger-ui .info p, .swagger-ui .info table,
.swagger-ui .opblock-tag, .swagger-ui .opblock .opblock-summary-description,
.swagger-ui .parameter__name, .swagger-ui .response-col_status, .swagger-ui table thead tr td, .swagger-ui table thead tr th,
.swagger-ui .model-title, .swagger-ui section.models h4, .swagger-ui label { color: var(--ps-ink); }

.swagger-ui a, .swagger-ui .info a, .swagger-ui .info .base-url, .swagger-ui .markdown a, .swagger-ui .renderedMarkdown a {
  color: var(--ps-ink);
  text-decoration: underline; text-decoration-color: var(--ps-yellow); text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.swagger-ui .info a:hover, .swagger-ui .markdown a:hover, .swagger-ui .renderedMarkdown a:hover { color: var(--ps-ink); text-decoration-color: var(--ps-ink); }
.swagger-ui .opblock-tag:hover { background: var(--ps-yellow-soft); }
.swagger-ui .opblock-tag { border-bottom-color: var(--ps-line); }

/* Barra nativa di Swagger (index.html): bianca, senza il logo Swagger, con il campo URL nei colori del brand. */
.swagger-ui .topbar { background: #fff; padding: 10px 0; border-bottom: 1px solid var(--ps-line); }
.swagger-ui .topbar .topbar-wrapper .link,
.swagger-ui .topbar .topbar-wrapper a.link { display: none; }
.swagger-ui .topbar .download-url-wrapper .select-label { color: var(--ps-ink); }
.swagger-ui .topbar .download-url-wrapper input[type=text] { border-color: var(--ps-ink); border-radius: 8px 0 0 8px; font-family: var(--ps-font-mono); }
.swagger-ui .topbar .download-url-wrapper .download-url-button {
  background: var(--ps-yellow); color: #000; border-radius: 0 999px 999px 0; font-weight: 400;
}
.swagger-ui .topbar .download-url-wrapper .select-label select { border-color: var(--ps-yellow); }

/* Pulsanti: azioni principali gialle, secondarie con contorno nero; arrotondati come le CTA del sito. */
.swagger-ui .btn { border-radius: 999px; box-shadow: none; }
.swagger-ui .btn.execute { background: var(--ps-yellow); border-color: var(--ps-yellow); color: #000; }
.swagger-ui .btn.execute:hover { background: var(--ps-yellow-hover); border-color: var(--ps-yellow-hover); }
.swagger-ui .btn.authorize { color: var(--ps-ink); border-color: var(--ps-ink); background: #fff; }
.swagger-ui .btn.authorize svg { fill: var(--ps-ink); }
.swagger-ui .btn.authorize:hover { background: var(--ps-yellow); border-color: var(--ps-yellow); }
.swagger-ui .btn.try-out__btn, .swagger-ui .btn.btn-clear, .swagger-ui .btn.cancel, .swagger-ui .btn.modal-btn { border-color: var(--ps-ink); color: var(--ps-ink); }
.swagger-ui .btn.try-out__btn:not(.cancel):hover, .swagger-ui .btn.btn-clear:hover, .swagger-ui .btn.modal-btn:hover { background: var(--ps-yellow); border-color: var(--ps-yellow); }
.swagger-ui .btn.cancel { border-color: #c0392b; color: #c0392b; background: #fff; }
.swagger-ui .btn.cancel:hover { background: #fdecea; }
.swagger-ui .btn-group .btn:first-child { border-radius: 999px 0 0 999px; }
.swagger-ui .btn-group .btn:last-child { border-radius: 0 999px 999px 0; }
.swagger-ui .authorization__btn svg { fill: var(--ps-ink); }

/* Campi, schede e filtro */
.swagger-ui input[type=text], .swagger-ui input[type=password], .swagger-ui input[type=search],
.swagger-ui input[type=email], .swagger-ui input[type=file], .swagger-ui textarea, .swagger-ui select { border-radius: 8px; }
.swagger-ui input[type=text]:focus, .swagger-ui input[type=password]:focus, .swagger-ui input[type=search]:focus,
.swagger-ui textarea:focus, .swagger-ui select:focus { outline: none; border-color: var(--ps-ink); box-shadow: 0 0 0 3px rgba(254, 202, 22, .6); }
.swagger-ui .filter .operation-filter-input { border: 2px solid var(--ps-ink); border-radius: 8px; }
.swagger-ui .tab li.active, .swagger-ui .tab li button.tablinks.active { font-family: var(--ps-font-heading); font-weight: 700; }
.swagger-ui .tab li:first-of-type:after { background: var(--ps-line); }
.swagger-ui .scheme-container { box-shadow: none; border-bottom: 1px solid var(--ps-line); }
.swagger-ui .loading-container .loading:before { border-color: var(--ps-yellow-soft); border-top-color: var(--ps-yellow); }
.swagger-ui .dialog-ux .modal-ux { border-radius: 12px; border-color: var(--ps-line); }
.swagger-ui .dialog-ux .modal-ux-header { border-bottom-color: var(--ps-yellow); border-bottom-width: 3px; }

/* Pulsanti delle pagine indice (custom.html, db.html): stile delle CTA gialle. */
.cerca button {
  padding: 8px 20px; font: 400 16px var(--ps-font-body); color: #000;
  background: var(--ps-yellow); border: 2px solid var(--ps-yellow); border-radius: 999px; cursor: pointer;
}
.cerca button:hover { background: var(--ps-yellow-hover); border-color: var(--ps-yellow-hover); }

/* Testo delle descrizioni (Markdown): titoli Nunito neri, codice in linea su giallo tenue invece del viola di Swagger. */
.swagger-ui .markdown h1, .swagger-ui .markdown h2, .swagger-ui .markdown h3, .swagger-ui .markdown h4,
.swagger-ui .renderedMarkdown h1, .swagger-ui .renderedMarkdown h2, .swagger-ui .renderedMarkdown h3, .swagger-ui .renderedMarkdown h4 {
  font-family: var(--ps-font-heading); font-weight: 800; color: var(--ps-ink);
}
.swagger-ui .markdown code, .swagger-ui .renderedMarkdown code {
  font-family: var(--ps-font-mono); color: var(--ps-ink); background: var(--ps-yellow-soft);
}

/* Barra URL di Swagger su schermi stretti: il campo si restringe invece di uscire dalla pagina. */
.swagger-ui .topbar .topbar-wrapper, .swagger-ui .topbar .download-url-wrapper { min-width: 0; }
.swagger-ui .topbar .download-url-wrapper { flex: 1 1 auto; }
.swagger-ui .topbar .download-url-wrapper input[type=text] { min-width: 0; width: 100%; }
@media (max-width: 560px) {
  .swagger-ui .scheme-container .schemes { flex-wrap: wrap; gap: 12px; }
  .swagger-ui .scheme-container .auth-wrapper { flex: 1 1 100%; justify-content: flex-start; }
  .swagger-ui .topbar .wrapper, .swagger-ui .information-container.wrapper, .swagger-ui .scheme-container .wrapper { padding: 0 16px; }
}

/* Pagine indice: titoli, etichette e nomi in Nunito (Varela Round non ha il grassetto). */
.indice :is(h1, h2, h3, label, strong, .nome) { font-family: var(--ps-font-heading); }
.indice :is(h1) { font-weight: 800; }
