html {
  box-sizing: border-box;
  overflow-y: scroll;
}

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

:root {
  --swagger-page-background: #f5f7fb;
  --swagger-page-color: #122033;
  --swagger-header-background: #122033;
  --swagger-header-color: #fff;
  --swagger-label-color: rgba(255, 255, 255, 0.78);
  --swagger-input-border: rgba(255, 255, 255, 0.18);
  --swagger-input-background: rgba(255, 255, 255, 0.12);
  --swagger-input-color: #fff;
  --swagger-input-placeholder: rgba(255, 255, 255, 0.62);
  --swagger-toggle-background: rgba(255, 255, 255, 0.12);
  --swagger-toggle-border: rgba(255, 255, 255, 0.18);
  --swagger-toggle-color: #fff;
  color-scheme: light;
}

html[data-theme="dark"] {
  --swagger-page-background: #0b1220;
  --swagger-page-color: #e2e8f0;
  --swagger-header-background: #020817;
  --swagger-header-color: #f8fafc;
  --swagger-label-color: rgba(226, 232, 240, 0.78);
  --swagger-input-border: rgba(148, 163, 184, 0.4);
  --swagger-input-background: rgba(15, 23, 42, 0.92);
  --swagger-input-color: #f8fafc;
  --swagger-input-placeholder: rgba(148, 163, 184, 0.9);
  --swagger-toggle-background: rgba(15, 23, 42, 0.92);
  --swagger-toggle-border: rgba(148, 163, 184, 0.4);
  --swagger-toggle-color: #f8fafc;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--swagger-page-background);
  color: var(--swagger-page-color);
  font-family: Helvetica, Arial, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.swagger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--swagger-header-background);
  color: var(--swagger-header-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.swagger-brand {
  color: inherit;
  text-decoration: none;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.swagger-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.swagger-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--swagger-label-color);
}

.swagger-input {
  min-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--swagger-input-border);
  border-radius: 6px;
  background: var(--swagger-input-background);
  color: var(--swagger-input-color);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.swagger-input::placeholder {
  color: var(--swagger-input-placeholder);
}

.swagger-select {
  min-width: 160px;
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--swagger-input-border);
  border-radius: 6px;
  background-color: var(--swagger-input-background);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  color: var(--swagger-input-color);
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.swagger-select:focus,
.swagger-input:focus {
  outline: none;
  border-color: var(--swagger-input-color);
}

.swagger-select option {
  color: #122033;
  background: #fff;
}

html[data-theme="dark"] .swagger-select option {
  color: #f8fafc;
  background: #0f172a;
}

.swagger-theme-toggle {
  padding: 10px 14px;
  border: 1px solid var(--swagger-toggle-border);
  border-radius: 999px;
  background: var(--swagger-toggle-background);
  color: var(--swagger-toggle-color);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.swagger-theme-toggle:hover {
  opacity: 0.92;
}

#swagger-ui-container {
  min-height: calc(100vh - 72px);
}

.swagger-ui .topbar {
  display: none;
}

.swagger-ui .btn.authorize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swagger-ui .btn.authorize span {
  float: none;
  padding: 0;
}

html[data-hide-api-key="true"] .swagger-auth {
  display: none;
}

html[data-hide-info-url="true"] .swagger-ui .info > a.link {
  display: none;
}

html[data-theme="dark"] .swagger-ui {
  background: transparent;
  color: #e2e8f0;
}

html[data-theme="dark"] .swagger-ui,
html[data-theme="dark"] .swagger-ui .info,
html[data-theme="dark"] .swagger-ui section.models,
html[data-theme="dark"] .swagger-ui .scheme-container,
html[data-theme="dark"] .swagger-ui .opblock-tag,
html[data-theme="dark"] .swagger-ui .opblock .opblock-summary,
html[data-theme="dark"] .swagger-ui .opblock .opblock-section-header,
html[data-theme="dark"] .swagger-ui .responses-inner h4,
html[data-theme="dark"] .swagger-ui .responses-inner h5,
html[data-theme="dark"] .swagger-ui table thead tr td,
html[data-theme="dark"] .swagger-ui table thead tr th {
  color: #e2e8f0;
}

html[data-theme="dark"] .swagger-ui .scheme-container,
html[data-theme="dark"] .swagger-ui section.models,
html[data-theme="dark"] .swagger-ui .model-container,
html[data-theme="dark"] .swagger-ui .responses-inner,
html[data-theme="dark"] .swagger-ui .opblock .opblock-section-header,
html[data-theme="dark"] .swagger-ui .opblock-body pre,
html[data-theme="dark"] .swagger-ui .highlight-code,
html[data-theme="dark"] .swagger-ui .microlight {
  background: #0f172a;
  color: #e2e8f0;
}

.swagger-ui .markdown,
.swagger-ui .renderedMarkdown {
  line-height: 1.2em;
}

.swagger-ui .markdown code,
.swagger-ui .renderedMarkdown code {
  padding: 2px 5px;
  font-size: 1em;
}

html[data-theme="dark"] .swagger-ui .renderedMarkdown code,
html[data-theme="dark"] .swagger-ui .markdown code {
  background: #0f172a;
  color: #c4b5fd;
}

html[data-theme="dark"] .swagger-ui .renderedMarkdown pre > code,
html[data-theme="dark"] .swagger-ui .markdown pre > code {
  display: block;
  background: transparent;
  color: inherit;
  padding: 0;
}

html[data-theme="dark"] .swagger-ui .renderedMarkdown pre,
html[data-theme="dark"] .swagger-ui .markdown pre {
  background: #0f172a;
  color: #e2e8f0;
}

html[data-theme="dark"] .swagger-ui .info a,
html[data-theme="dark"] .swagger-ui .opblock-tag,
html[data-theme="dark"] .swagger-ui .opblock-tag small,
html[data-theme="dark"] .swagger-ui .opblock-summary-path,
html[data-theme="dark"] .swagger-ui .opblock-summary-description,
html[data-theme="dark"] .swagger-ui .parameter__name,
html[data-theme="dark"] .swagger-ui .parameter__type,
html[data-theme="dark"] .swagger-ui .response-col_status,
html[data-theme="dark"] .swagger-ui .response-col_links,
html[data-theme="dark"] .swagger-ui label,
html[data-theme="dark"] .swagger-ui .tab li,
html[data-theme="dark"] .swagger-ui .model-title,
html[data-theme="dark"] .swagger-ui .prop-name {
  color: #ffffff;
}

html[data-theme="dark"] .swagger-ui input[type="text"],
html[data-theme="dark"] .swagger-ui input[type="password"],
html[data-theme="dark"] .swagger-ui input[type="search"],
html[data-theme="dark"] .swagger-ui input[type="email"],
html[data-theme="dark"] .swagger-ui input[type="file"],
html[data-theme="dark"] .swagger-ui textarea,
html[data-theme="dark"] .swagger-ui select {
  background: #111827;
  color: #f8fafc;
  border-color: #334155;
}

html[data-theme="dark"] .swagger-ui .btn,
html[data-theme="dark"] .swagger-ui .model-box {
  border-color: #475569;
}

.swagger-ui .model-box table.model tr.description > td,
.swagger-ui .model-box table.model tr.property-row > td {
  vertical-align: baseline;
}

@media (max-width: 767px) {
  .swagger-header {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .swagger-brand {
    font-size: 20px;
    line-height: 1.2;
  }

  .swagger-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .swagger-auth {
    width: 100%;
  }

  .swagger-label {
    display: block;
    margin-bottom: 6px;
  }

  .swagger-input,
  .swagger-select,
  .swagger-theme-toggle {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #swagger-ui-container {
    min-height: calc(100vh - 152px);
  }

  .swagger-ui {
    font-size: 15px;
  }

  .swagger-ui .wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }

  .swagger-ui .info {
    margin: 24px 0;
  }

  .swagger-ui .info .title {
    font-size: 34px;
    line-height: 1.1;
    word-break: break-word;
  }

  .swagger-ui .opblock-tag {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 12px;
    padding-top: 18px;
    padding-bottom: 18px;
    padding-right: 44px;
  }

  .swagger-ui .opblock-tag-section h3 {
    min-width: 0;
    margin: 0;
    line-height: 1.15;
    word-break: break-word;
  }

  .swagger-ui .opblock-tag small {
    flex: 1 1 100%;
    min-width: 0;
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .swagger-ui .expand-operation {
    position: absolute;
    top: 50%;
    right: 0;
    margin: 0;
    transform: translateY(-50%);
  }
}
