/*
 * Swagger UI — Tokyo Night Storm theme
 * Palette from https://github.com/folke/tokyonight.nvim (storm variant)
 *
 * bg         #24283b    bg-dark    #1f2335
 * bg-hl      #292e42    fg         #c0caf5
 * fg-dark    #a9b1d6    fg-gutter  #3b4261
 * comment    #565f89    blue       #7aa2f7
 * cyan       #7dcfff    teal       #73daca
 * green      #9ece6a    orange     #ff9e64
 * yellow     #e0af68    red        #f7768e
 * purple     #bb9af7    magenta    #ff007c
 */

html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  background: #24283b;
  color: #c0caf5;
}

/* ── Top bar ─────────────────────────────────────────── */
.swagger-ui .topbar {
  background-color: #1f2335;
}

/* ── Info section ────────────────────────────────────── */
.swagger-ui .info .title,
.swagger-ui .info .title small,
.swagger-ui .info h1, .swagger-ui .info h2, .swagger-ui .info h3,
.swagger-ui .info h4, .swagger-ui .info h5, .swagger-ui .info h6 {
  color: #c0caf5;
}

.swagger-ui .info p, .swagger-ui .info li,
.swagger-ui .info table td, .swagger-ui .info table th {
  color: #a9b1d6;
}

.swagger-ui .info a { color: #7aa2f7; }

/* ── Scheme / server selector ────────────────────────── */
.swagger-ui .scheme-container {
  background: #1f2335;
  box-shadow: none;
}

.swagger-ui .scheme-container .schemes > label { color: #a9b1d6; }

/* ── Operation tags ──────────────────────────────────── */
.swagger-ui .opblock-tag {
  color: #c0caf5;
  border-bottom-color: #292e42;
}

.swagger-ui .opblock-tag:hover { background: rgba(122,162,247,0.06); }
.swagger-ui .opblock-tag small { color: #565f89; }

/* ── HTTP method blocks ──────────────────────────────── */
.swagger-ui .opblock.opblock-get    { background: rgba(122,162,247,0.08); border-color: #7aa2f7; }
.swagger-ui .opblock.opblock-post   { background: rgba(158,206,106,0.08); border-color: #9ece6a; }
.swagger-ui .opblock.opblock-put    { background: rgba(255,158,100,0.08); border-color: #ff9e64; }
.swagger-ui .opblock.opblock-delete { background: rgba(247,118,142,0.08); border-color: #f7768e; }
.swagger-ui .opblock.opblock-patch  { background: rgba(115,218,202,0.08); border-color: #73daca; }

.swagger-ui .opblock .opblock-summary-method { color: #fff; }
.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-description { color: #a9b1d6; }
.swagger-ui .opblock .opblock-summary-path__deprecated { color: #565f89; }

.swagger-ui .opblock .opblock-section-header {
  background: rgba(41,46,66,0.6);
  box-shadow: none;
}

.swagger-ui .opblock .opblock-section-header h4 { color: #c0caf5; }

/* ── Parameters & responses ──────────────────────────── */
.swagger-ui .parameters-col_description p,
.swagger-ui .parameter__name, .swagger-ui .parameter__type,
.swagger-ui .parameter__in { color: #a9b1d6; }

.swagger-ui .parameter__name.required span { color: #f7768e; }
.swagger-ui .parameter__name.required::after { color: #f7768e; }

.swagger-ui table thead tr td, .swagger-ui table thead tr th {
  color: #a9b1d6;
  border-bottom-color: #3b4261;
}

.swagger-ui .response-col_status { color: #c0caf5; }
.swagger-ui .response-col_description p { color: #a9b1d6; }
.swagger-ui .responses-inner h4, .swagger-ui .responses-inner h5 { color: #a9b1d6; }

/* ── Models ──────────────────────────────────────────── */
.swagger-ui .model-title { color: #c0caf5; }
.swagger-ui .model { color: #a9b1d6; }
.swagger-ui .model .property.primitive { color: #7dcfff; }

.swagger-ui section.models {
  border: 1px solid #292e42;
}

.swagger-ui section.models h4 { color: #c0caf5; }
.swagger-ui section.models .model-container {
  background: rgba(41,46,66,0.3);
  margin: 0 0 1px;
}

/* ── Code / example blocks ───────────────────────────── */
.swagger-ui .highlight-code,
.swagger-ui .example,
.swagger-ui .microlight {
  background: #1f2335 !important;
  color: #a9b1d6 !important;
}

.swagger-ui .copy-to-clipboard { background: #1f2335; }

/* ── Inputs ──────────────────────────────────────────── */
.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 {
  background: #24283b;
  color: #c0caf5;
  border-color: #3b4261;
}

.swagger-ui select { background: #24283b; color: #c0caf5; }

/* ── Buttons ─────────────────────────────────────────── */
.swagger-ui .btn {
  border-color: #3b4261;
  color: #a9b1d6;
}

.swagger-ui .btn:hover { box-shadow: 0 0 5px rgba(122,162,247,0.3); }
.swagger-ui .btn.execute { background-color: #7aa2f7; border-color: #7aa2f7; color: #1f2335; }
.swagger-ui .btn.authorize { color: #9ece6a; border-color: #9ece6a; }
.swagger-ui .btn.cancel { color: #f7768e; border-color: #f7768e; }

/* ── Auth dialog ─────────────────────────────────────── */
.swagger-ui .dialog-ux .modal-ux {
  background: #24283b;
  border-color: #292e42;
}

.swagger-ui .dialog-ux .modal-ux-header h3 { color: #c0caf5; }
.swagger-ui .dialog-ux .modal-ux-content p { color: #a9b1d6; }

/* ── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #24283b; }
::-webkit-scrollbar-thumb { background: #3b4261; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #565f89; }

/* ── Misc ────────────────────────────────────────────── */
.swagger-ui .responses-table .response-col_links { color: #a9b1d6; }
.swagger-ui .loading-container .loading::after { color: #a9b1d6; }

.swagger-ui .markdown p, .swagger-ui .markdown li { color: #a9b1d6; }
.swagger-ui .markdown code {
  background: #1f2335;
  color: #7dcfff;
}

.swagger-ui .tab li { color: #565f89; }
.swagger-ui .tab li.active { color: #c0caf5; }

.swagger-ui .responses-inner { background: transparent; }
.swagger-ui .live-responses-table .response-col_status { color: #c0caf5; }

/* ── Arrows / expand icons ───────────────────────────── */
.swagger-ui .expand-operation svg,
.swagger-ui .model-toggle::after { fill: #565f89; }

/* ── Links everywhere ────────────────────────────────── */
.swagger-ui a { color: #7aa2f7; }
