/* ================================================================
   SWAGGER UI - Dark theme override
   Applied via swaggerUi.setup(spec, { customCssUrl: "/css/swagger-dark.css" })
   ================================================================ */

body {
  background: #0a0a0a !important;
}

.swagger-ui {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
}

/* Top bar - hidden */
.swagger-ui .topbar {
  display: none !important;
}

.swagger-ui .topbar .download-url-wrapper .select-label {
  color: #888 !important;
}

/* Main content */
/* Servers section */
.swagger-ui .scheme-container {
  background: #0a0a0a !important;
  border-bottom: 1px solid #232323;
  box-shadow: none !important;
}

/* Fix SVG arrows (expand/collapse, dropdowns) */
.swagger-ui svg.arrow,
.swagger-ui .expand-operation svg,
.swagger-ui .model-toggle::after,
.swagger-ui button.model-box-control svg {
  fill: #888 !important;
}

.swagger-ui .servers-title,
.swagger-ui .servers label {
  color: #888 !important;
}

.swagger-ui .servers > label > select {
  border: 1px solid #333 !important;
  background: #1a1a1a !important;
  color: #ededed !important;
  border-radius: 6px !important;
  outline: none !important;
}

/* Fix dotted outlines on selects and buttons */
.swagger-ui select:focus,
.swagger-ui button:focus,
.swagger-ui input:focus,
.swagger-ui textarea:focus {
  outline: 1px solid #333 !important;
  outline-offset: 0 !important;
}

.swagger-ui select,
.swagger-ui button,
.swagger-ui .opblock-summary {
  outline: none !important;
  border-style: solid !important;
}

/* Remove dotted focus rings (the "arrows" artifact) */
.swagger-ui *:focus {
  outline-style: solid !important;
}

.swagger-ui *::-moz-focus-inner {
  border: 0 !important;
}

.swagger-ui .info {
  margin: 20px 0 !important;
}

.swagger-ui .info .title {
  color: #ededed !important;
}

.swagger-ui .info .description,
.swagger-ui .info .description p {
  color: #888 !important;
}

.swagger-ui .info a {
  color: #22c55e !important;
}

/* Operations */
.swagger-ui .opblock-tag {
  color: #ededed !important;
  border-bottom: 1px solid #232323 !important;
}

.swagger-ui .opblock {
  border-radius: 10px !important;
  border: 1px solid #232323 !important;
  box-shadow: none !important;
  margin-bottom: 8px !important;
  background: #141414 !important;
}

.swagger-ui .opblock .opblock-summary {
  border-bottom: 1px solid #232323 !important;
}

.swagger-ui .opblock .opblock-summary-method {
  border-radius: 6px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  min-width: 60px;
}

.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-description {
  color: #ededed !important;
}

.swagger-ui .opblock .opblock-section-header {
  background: #1a1a1a !important;
  border-bottom: 1px solid #232323 !important;
}

.swagger-ui .opblock .opblock-section-header h4 {
  color: #ededed !important;
}

/* GET */
.swagger-ui .opblock.opblock-get {
  background: rgba(34, 197, 94, 0.04) !important;
  border-color: rgba(34, 197, 94, 0.15) !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary {
  border-color: rgba(34, 197, 94, 0.15) !important;
}

/* POST */
.swagger-ui .opblock.opblock-post {
  background: rgba(59, 130, 246, 0.04) !important;
  border-color: rgba(59, 130, 246, 0.15) !important;
}

/* PUT */
.swagger-ui .opblock.opblock-put {
  background: rgba(245, 158, 11, 0.04) !important;
  border-color: rgba(245, 158, 11, 0.15) !important;
}

/* DELETE */
.swagger-ui .opblock.opblock-delete {
  background: rgba(239, 68, 68, 0.04) !important;
  border-color: rgba(239, 68, 68, 0.15) !important;
}

/* Models */
.swagger-ui section.models {
  border: 1px solid #232323 !important;
  border-radius: 10px !important;
}

.swagger-ui section.models h4 {
  color: #ededed !important;
}

.swagger-ui .model-box {
  background: #141414 !important;
}

.swagger-ui .model {
  color: #888 !important;
}

.swagger-ui .model-title {
  color: #ededed !important;
}

/* Tables & params */
.swagger-ui table thead tr th {
  color: #888 !important;
  border-bottom: 1px solid #232323 !important;
}

.swagger-ui table tbody tr td {
  color: #ededed !important;
  border-bottom: 1px solid #1a1a1a !important;
}

.swagger-ui .parameters-col_description p,
.swagger-ui .parameter__name,
.swagger-ui .parameter__type {
  color: #888 !important;
}

.swagger-ui .parameter__name.required::after {
  color: #ef4444 !important;
}

/* Inputs */
.swagger-ui input[type="text"],
.swagger-ui textarea,
.swagger-ui select {
  background: #1a1a1a !important;
  border: 1px solid #333 !important;
  color: #ededed !important;
  border-radius: 6px !important;
}

.swagger-ui select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M2.5 4.5l3.5 3.5 3.5-3.5'/%3E%3C/svg%3E") !important;
}

/* Response */
.swagger-ui .responses-inner {
  background: transparent !important;
}

.swagger-ui .response-col_status {
  color: #ededed !important;
}

.swagger-ui .response-col_description {
  color: #888 !important;
}

/* Code blocks */
.swagger-ui .highlight-code,
.swagger-ui .microlight {
  background: #1a1a1a !important;
  border-radius: 8px !important;
  border: 1px solid #232323 !important;
  color: #ededed !important;
}

/* Buttons */
.swagger-ui .btn {
  border-radius: 6px !important;
}

.swagger-ui .btn.execute {
  background: #22c55e !important;
  border-color: #22c55e !important;
  color: #fff !important;
}

.swagger-ui .btn.authorize {
  color: #22c55e !important;
  border-color: #22c55e !important;
}

/* Auth dialog */
.swagger-ui .dialog-ux .modal-ux {
  background: #141414 !important;
  border: 1px solid #232323 !important;
  border-radius: 14px !important;
}

.swagger-ui .dialog-ux .modal-ux-header h3 {
  color: #ededed !important;
}

/* Scrollbar */
.swagger-ui ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.swagger-ui ::-webkit-scrollbar-track {
  background: #141414;
}

.swagger-ui ::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.swagger-ui ::-webkit-scrollbar-thumb:hover {
  background: #555;
}
