/* Coolx Earth - Custom Swagger UI Theme */
/* Color Palette:
   - Primary (Dark Blue): #09427D
   - Soft Primary (Dark Turquoise): #70BFCB
   - Secondary (Light Blue): #E0ECF8
   - Medium Blue: #BFD1E3
   - Background (Light Gray): #F2F4F6
   - Danger (Fire Engine Red): #C1212B
   - Mint: #D2F6EE
   - Medium Gray: #BCC2CC
*/

/* === Page Background === */
html, body {
  background-color: #F2F4F6 !important;
}

.swagger-ui {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* === Top Bar === */
/* Hide the Swagger topbar completely */
.swagger-ui .topbar {
  display: none !important;
}

/* === Info Section === */
.swagger-ui .info {
  margin: 30px 0;
}

.swagger-ui .info .title {
  color: #09427D !important;
  font-weight: 700;
}

.swagger-ui .info a {
  color: #70BFCB !important;
}

.swagger-ui .info a:hover {
  color: #09427D !important;
}

/* === Scheme Selector === */
.swagger-ui .scheme-container {
  background-color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 20px;
  border-radius: 8px;
}

/* === Operations (Endpoints) === */
.swagger-ui .opblock-tag {
  color: #09427D !important;
  font-weight: 600;
  border-bottom: 2px solid #E0ECF8;
}

.swagger-ui .opblock-tag:hover {
  background-color: #E0ECF8 !important;
}

/* POST - Turquoise theme */
.swagger-ui .opblock.opblock-post {
  border-color: #70BFCB !important;
  background: rgba(112, 191, 203, 0.1) !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
  background-color: #70BFCB !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary {
  border-color: #70BFCB !important;
}

/* GET - Primary Blue theme */
.swagger-ui .opblock.opblock-get {
  border-color: #09427D !important;
  background: rgba(9, 66, 125, 0.05) !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary-method {
  background-color: #09427D !important;
}

.swagger-ui .opblock.opblock-get .opblock-summary {
  border-color: #09427D !important;
}

/* DELETE - Danger Red theme */
.swagger-ui .opblock.opblock-delete {
  border-color: #C1212B !important;
  background: rgba(193, 33, 43, 0.1) !important;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-method {
  background-color: #C1212B !important;
}

/* PUT - Medium Blue theme */
.swagger-ui .opblock.opblock-put {
  border-color: #BFD1E3 !important;
  background: rgba(191, 209, 227, 0.2) !important;
}

.swagger-ui .opblock.opblock-put .opblock-summary-method {
  background-color: #09427D !important;
  opacity: 0.8;
}

/* === Buttons === */
/* Hide Authorize button - not needed for read-only docs */
.swagger-ui .btn.authorize,
.swagger-ui .authorization__btn {
  display: none !important;
}

/* Hide lock icons on endpoints */
.swagger-ui .opblock-summary-operation-id + .authorization__btn,
.swagger-ui .opblock .authorization__btn {
  display: none !important;
}

/* Execute button (if enabled) */
.swagger-ui .btn.execute {
  background-color: #70BFCB !important;
  border-color: #70BFCB !important;
  color: #FFFFFF !important;
}

.swagger-ui .btn.execute:hover {
  background-color: #09427D !important;
  border-color: #09427D !important;
}

/* Try it out button */
.swagger-ui .try-out__btn {
  border-color: #09427D !important;
  color: #09427D !important;
}

.swagger-ui .try-out__btn:hover {
  background-color: #E0ECF8 !important;
}

/* Cancel button */
.swagger-ui .btn.cancel {
  border-color: #BCC2CC !important;
  color: #000000 !important;
}

/* === Models/Schemas Section === */
.swagger-ui section.models {
  border-color: #BFD1E3 !important;
}

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

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

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

/* Make all schema name buttons the same width */
.swagger-ui .model-box-control {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-start !important;
}

.swagger-ui .model-box-control .model-box-control {
  width: auto !important;
}

/* Schema toggle button - fixed width */
.swagger-ui section.models .model-container > span > .model-box > .model-box-control:first-child {
  min-width: 280px !important;
  max-width: 280px !important;
}

/* === Response Section === */
.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5 {
  color: #09427D !important;
}

.swagger-ui .response-col_status {
  color: #09427D !important;
  font-weight: 600;
}

.swagger-ui table.responses-table {
  background-color: #FFFFFF;
}

/* Response status codes */
.swagger-ui .response-col_status {
  color: #09427D !important;
  font-weight: 700 !important;
  font-size: 14px !important;
}

/* Success responses (2xx) */
.swagger-ui .responses-table .response:first-child .response-col_status {
  color: #70BFCB !important;
}

/* Dropdowns in responses (Media type, Examples) */
.swagger-ui .responses-wrapper select,
.swagger-ui .response-controls select {
  border: 1px solid #BFD1E3 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: #09427D !important;
  background-color: #FFFFFF !important;
}

.swagger-ui .responses-wrapper select:focus,
.swagger-ui .response-controls select:focus {
  border-color: #70BFCB !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(112, 191, 203, 0.2) !important;
}

/* Example Value | Schema tabs */
.swagger-ui .tab li:first-of-type::after {
  background-color: #BFD1E3 !important;
}

.swagger-ui .tab li button.tablinks {
  color: #09427D !important;
  font-weight: 500 !important;
}

.swagger-ui .tab li button.tablinks:hover {
  color: #70BFCB !important;
}

.swagger-ui .tab li button.tablinks.active {
  color: #70BFCB !important;
}

/* "Controls Accept header" text */
.swagger-ui .response-control-media-type__accept-message {
  color: #70BFCB !important;
  font-size: 12px !important;
}

/* "No links" text */
.swagger-ui .response-col_links {
  color: #BCC2CC !important;
}

/* Response description */
.swagger-ui .response-col_description {
  color: #000000 !important;
}

.swagger-ui .response-col_description h4,
.swagger-ui .response-col_description h5 {
  color: #09427D !important;
  margin-bottom: 10px !important;
}

/* Media type label */
.swagger-ui .response-control-media-type {
  color: #09427D !important;
}

.swagger-ui .response-control-media-type__title {
  color: #000000 !important;
  font-weight: 500 !important;
}

/* Examples label */
.swagger-ui .response-control-examples__title {
  color: #000000 !important;
  font-weight: 500 !important;
}

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

/* === Response table - unified background === */
.swagger-ui .response-col_status,
.swagger-ui .response-col_description,
.swagger-ui .response-col_links,
.swagger-ui .responses-table thead tr,
.swagger-ui table.responses-table tr.response {
  background-color: #FFFFFF !important;
}

.swagger-ui .col_header {
  background-color: #FFFFFF !important;
}

/* Add left padding to Code column */
.swagger-ui .response-col_status {
  padding-left: 30px !important;
}

.swagger-ui .col_header.response-col_status {
  padding-left: 30px !important;
}

/* Visual separation between different response cases */
.swagger-ui table.responses-table tr.response {
  border-bottom: none !important;
}

.swagger-ui table.responses-table tr.response td {
  padding-top: 25px !important;
  padding-bottom: 25px !important;
  border-bottom: 2px solid #BCC2CC !important;
}

/* === Tab buttons === */
.swagger-ui .tab li button.tablinks {
  color: #09427D !important;
}

.swagger-ui .tab li button.tablinks.active {
  border-bottom-color: #70BFCB !important;
}

/* === Parameters === */
.swagger-ui .parameters-col_description {
  color: #000000 !important;
}

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

/* Add left padding to Parameters table */
.swagger-ui .parameters-col_name {
  padding-left: 30px !important;
}

.swagger-ui .col_header.parameters-col_name {
  padding-left: 30px !important;
}

/* Parameters table unified background */
.swagger-ui table.parameters tbody tr td {
  background-color: #FFFFFF !important;
}

/* === Server dropdown === */
.swagger-ui .servers > label select {
  border-color: #BFD1E3 !important;
  border-radius: 6px;
}

/* === Links === */
.swagger-ui a {
  color: #70BFCB !important;
}

.swagger-ui a:hover {
  color: #09427D !important;
}

/* === Scrollbar === */
.swagger-ui ::-webkit-scrollbar {
  width: 10px;
}

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

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

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

/* === Authorization Modal === */
.swagger-ui .dialog-ux .modal-ux {
  border-radius: 8px !important;
  border: 1px solid #BFD1E3 !important;
}

.swagger-ui .dialog-ux .modal-ux-header {
  border-bottom: 1px solid #E0ECF8 !important;
}

.swagger-ui .dialog-ux .modal-ux-header h3 {
  color: #09427D !important;
  font-weight: 600 !important;
}

.swagger-ui .dialog-ux .modal-ux-content h4 {
  color: #09427D !important;
}

/* Code block in modal */
.swagger-ui .dialog-ux .modal-ux-content code {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-radius: 6px !important;
  padding: 15px !important;
}

/* Input field */
.swagger-ui .dialog-ux .modal-ux-content input[type="text"] {
  border: 1px solid #BFD1E3 !important;
  border-radius: 6px !important;
  padding: 10px !important;
}

.swagger-ui .dialog-ux .modal-ux-content input[type="text"]:focus {
  border-color: #70BFCB !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(112, 191, 203, 0.2) !important;
}

/* Authorize button in modal */
.swagger-ui .auth-btn-wrapper .btn.modal-btn.auth.authorize {
  background-color: #70BFCB !important;
  border-color: #70BFCB !important;
  color: #FFFFFF !important;
  border-radius: 6px !important;
  font-weight: 500 !important;
}

.swagger-ui .auth-btn-wrapper .btn.modal-btn.auth.authorize:hover {
  background-color: #09427D !important;
  border-color: #09427D !important;
}

/* Close button in modal */
.swagger-ui .auth-btn-wrapper .btn.modal-btn {
  border-radius: 6px !important;
}

/* Logout button */
.swagger-ui .btn.modal-btn.auth.btn-done {
  background-color: #09427D !important;
  border-color: #09427D !important;
  color: #FFFFFF !important;
  border-radius: 6px !important;
}

/* Modal overlay */
.swagger-ui .dialog-ux .backdrop-ux {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/* Close X button */
.swagger-ui .dialog-ux .modal-ux-header .close-modal {
  fill: #09427D !important;
}

.swagger-ui .dialog-ux .modal-ux-header .close-modal:hover {
  fill: #C1212B !important;
}

/* === Misc === */
.swagger-ui .opblock-description-wrapper p {
  color: #000000 !important;
}

.swagger-ui .opblock-summary-description {
  color: #000000 !important;
}

/* Remove unnecessary Swagger branding */
.swagger-ui .info hgroup.main a {
  display: none;
}
