/* Swagger UI di StayInPuglia: stesso comportamento di quello standard, con uno stile più leggero e ordinato. */

:root {
  --sip-brand: #3554d1;
  --sip-ink: #051036;
  --sip-line: #e2e8f0;
  --sip-soft: #f8fafc;
}

html { background: var(--sip-soft); }

body, .swagger-ui, .swagger-ui .opblock .opblock-summary-description, .swagger-ui .tab li, .swagger-ui table thead tr td, .swagger-ui table thead tr th,
.swagger-ui .parameter__name, .swagger-ui .response-col_status, .swagger-ui .info li, .swagger-ui .info p, .swagger-ui .info table, .swagger-ui .btn,
.swagger-ui select, .swagger-ui label, .swagger-ui .model-title, .swagger-ui section.models h4 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Testata: logo del portale, senza il selettore della definizione (ce n'è una sola) */
.swagger-ui .topbar { background: var(--sip-ink); padding: 10px 0; }
.swagger-ui .topbar .download-url-wrapper { display: none; }
.swagger-ui .topbar-wrapper { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; }
.swagger-ui .topbar-wrapper a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.swagger-ui .topbar-wrapper a svg, .swagger-ui .topbar-wrapper a span { display: none; }
.swagger-ui .topbar-wrapper a::before {
  content: "";
  width: 120px; height: 38px;
  background: #fff url("/swagger-ui/logo.png") center / contain no-repeat;
  border-radius: 10px;
}
.swagger-ui .topbar-wrapper a::after { content: "API"; color: #fff; font-weight: 700; letter-spacing: .08em; font-size: 14px; opacity: .85; }

/* Pagina più stretta e centrata */
.swagger-ui .wrapper { max-width: 1100px; padding: 0 20px; }

/* Titolo e introduzione */
.swagger-ui .info { margin: 34px 0 18px; }
.swagger-ui .info .title { font-size: 32px; color: var(--sip-ink); }
.swagger-ui .info .title small { vertical-align: middle; }
.swagger-ui .info .title small pre { font-size: 12px; }
.swagger-ui .info p, .swagger-ui .info li { font-size: 15px; line-height: 1.6; color: #334155; }
.swagger-ui .info code { background: #eef2ff; color: var(--sip-brand); border-radius: 6px; padding: 1px 6px; }
.swagger-ui .info a { color: var(--sip-brand); }

/* Barra con Authorize e filtro */
.swagger-ui .scheme-container { background: transparent; box-shadow: none; padding: 8px 0 16px; margin: 0; }
.swagger-ui .scheme-container .schemes { align-items: center; }
.swagger-ui .btn.authorize { color: var(--sip-brand); border-color: var(--sip-brand); border-radius: 10px; padding: 7px 18px; font-weight: 600; }
.swagger-ui .btn.authorize svg { fill: var(--sip-brand); }
.swagger-ui .filter-container { margin: 0; padding: 0 0 18px; }
.swagger-ui .filter-container .operation-filter-input {
  border: 1px solid var(--sip-line); border-radius: 12px; padding: 12px 16px; font-size: 15px; background: #fff; box-shadow: none; margin: 0;
}
.swagger-ui .filter-container .operation-filter-input:focus { outline: none; border-color: var(--sip-brand); box-shadow: 0 0 0 4px rgba(53, 84, 209, .12); }

/* Gruppi */
.swagger-ui .opblock-tag-section { background: #fff; border: 1px solid var(--sip-line); border-radius: 14px; margin: 0 0 12px; overflow: hidden; }
.swagger-ui .opblock-tag { border-bottom: 0; margin: 0; padding: 14px 18px; font-size: 17px; font-weight: 700; color: var(--sip-ink); }
.swagger-ui .opblock-tag:hover { background: var(--sip-soft); }
.swagger-ui .opblock-tag small { font-size: 13.5px; font-weight: 400; color: #64748b; }
.swagger-ui .opblock-tag-section.is-open .opblock-tag { border-bottom: 1px solid var(--sip-line); }
.swagger-ui .opblock-tag-section.is-open > div:last-child { padding: 10px 12px 14px; }

/* Operazioni: schede sobrie, metodo a pillola */
.swagger-ui .opblock { border-radius: 10px; box-shadow: none; margin: 0 0 8px; border-width: 1px; }
.swagger-ui .opblock .opblock-summary { padding: 6px 10px; align-items: center; }
.swagger-ui .opblock .opblock-summary-method { border-radius: 8px; min-width: 68px; font-size: 12px; padding: 6px 0; text-shadow: none; }
.swagger-ui .opblock .opblock-summary-path { font-size: 14px; font-weight: 600; color: var(--sip-ink); }
.swagger-ui .opblock .opblock-summary-description { font-size: 13.5px; color: #475569; }
.swagger-ui .opblock .opblock-section-header { box-shadow: none; background: rgba(255, 255, 255, .6); }
.swagger-ui .opblock .opblock-description-wrapper p, .swagger-ui .opblock .opblock-external-docs-wrapper p { font-size: 14px; color: #334155; }
.swagger-ui .btn.execute { background: var(--sip-brand); border-color: var(--sip-brand); border-radius: 10px; }
.swagger-ui .btn.try-out__btn { border-radius: 10px; }
.swagger-ui .responses-inner h4, .swagger-ui .responses-inner h5 { font-size: 14px; }
.swagger-ui table.responses-table tbody td, .swagger-ui table.parameters tbody td { font-size: 13.5px; }

/* Più respiro sugli schermi piccoli */
@media (max-width: 700px) {
  .swagger-ui .wrapper { padding: 0 12px; }
  .swagger-ui .opblock .opblock-summary-description { display: none; }
}

/* Il server è uno solo (/api), già indicato nell'introduzione: niente selettore */
.swagger-ui .scheme-container .servers, .swagger-ui .servers-title { display: none; }
.swagger-ui .opblock-tag, .swagger-ui .opblock .opblock-summary-path, .swagger-ui .info .title { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
