/* ============================================================
   AutoDWG API - Swagger UI Custom Theme
   All visible text is in English. No commercial fonts are used;
   only system fonts (Segoe UI / Helvetica / Arial) are applied.
   ============================================================ */

/* ---------- Global font: free system fonts only ---------- */
.swagger-ui,
.swagger-ui .info .title,
.swagger-ui .opblock-tag,
.swagger-ui .opblock .opblock-summary-operation-id,
.swagger-ui .opblock .opblock-summary-path,
.swagger-ui .opblock .opblock-summary-description,
.swagger-ui .btn,
.swagger-ui select,
.swagger-ui label,
.swagger-ui .parameter__name,
.swagger-ui table thead tr th,
.swagger-ui .response-col_status,
.swagger-ui .microlight,
.swagger-ui .highlight-code,
.swagger-ui code,
.swagger-ui pre,
.swagger-ui .model,
.swagger-ui textarea,
.swagger-ui input[type="text"],
.swagger-ui .response-col_description__inner div.markdown code,
.swagger-ui .opblock-section-header h4,
.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5,
.swagger-ui .response-col_description,
.swagger-ui .parameters-col_description {
  font-family: "Segoe UI", Helvetica, Arial, sans-serif !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

/* ---------- Page title ---------- */
.swagger-ui .info .title {
  font-size: 28px !important;
  font-weight: 700;
}

/* ---------- Op block: rounded cards ---------- */
.swagger-ui .opblock {
  border-radius: 8px;
  margin: 0 0 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---------- Tables & scrollbar ---------- */
.swagger-ui table.model tbody tr td {
  padding: 6px 10px;
}
/* In the Schema (model) table the property name is bare text while the value
   cell holds an inline <span class="model"> (with an expand button) and the
   description is wrapped in <div.renderedMarkdown><p>. With top alignment the
   inline model's line box adds leading above it, so the value sits ~5px below
   the name; the cells' own top padding (0 vs 6px) added another gap. Align on
   the text baseline, drop the top padding, and zero the <p> margin so both
   columns' first lines sit on the same line. Covers both the response Schema
   tab and the bottom Schemas section (both render table.model). */
.swagger-ui table.model tbody tr td {
  vertical-align: baseline !important;
  padding-top: 0 !important;
}
.swagger-ui table.model .renderedMarkdown p {
  margin: 0;
}
.swagger-ui ::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
.swagger-ui ::-webkit-scrollbar-thumb {
  background: #b0b8c4;
  border-radius: 4px;
}

/* ---------- Overrides for base swagger-ui.css ---------- */
/* The base rule `.swagger-ui svg:not(:root) { overflow: hidden; }` lives in
   the bundled swagger-ui.css (not on disk). Re-declaring it here (loaded
   after) lets us extend it. */
    .swagger-ui table {
        border-collapse: inherit;
    }

    .swagger-ui svg:not(:root) {
        overflow: hidden;
        padding-right: 5px;
    }

.copy-to-clipboard svg, .authorize svg, .authorization__btn svg {
    padding: 0 !important;
}

/* Response table tweaks: top-align Code/Description text, and hide the
   unused "Links" column (OpenAPI response links; we define none, so it
   always renders "No links"). */
.swagger-ui .responses-table th,
.swagger-ui .responses-table td {
    vertical-align: top;
}
.swagger-ui .responses-table .response-col_links {
    display: none;
}
/* Highlight a response-code row on hover so each code is easier to tell apart.
   Swagger puts the horizontal padding on the <table> (padding: 0 10px), which
   made the hover highlight stop short of the edges. Move that padding onto the
   cells instead so the highlight fills the full row width. */
.swagger-ui .responses-table {
    padding-left: 0;
    padding-right: 0;
}
    .swagger-ui .responses-table td {
        padding-left: 12px;
        padding-right: 12px;
        transition: background-color .12s ease;
        padding-bottom: 12px;
    }
/* The status (code) column has a more specific Swagger rule that keeps its
   horizontal padding at 0, so give the code some left/right breathing room. */
.swagger-ui .responses-table td.response-col_status {
    padding-left: 12px;
    padding-right: 12px;
}
.swagger-ui .responses-table tbody tr.response:hover td {
    background-color: rgba(0, 0, 0, .04);
}
/* Hide the built-in "Send empty value" checkbox on optional parameters. */
.swagger-ui .parameter__empty_value_toggle {
    display: none;
}
/* After Try it out, the visible "Example responses" heading is Swagger's inner
   h4 (tagged .x-example-heading by swagger.html). Style it to look exactly like
   the native .opblock-section-header bar (flex-centered, white bar, box-shadow)
   so the documented sample reads as its own section below the live result. */
.swagger-ui h4.x-example-heading {
    display: flex;
    align-items: center;
    min-height: 50px;
    margin: 12px 0 0;
    padding: 8px 20px;
    background: rgba(255, 255, 255, .8);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .1);
    font-size: 13px;
    font-weight: 700;
    color: #3b4151;
    border-top: none;
}
/* Zero the inner <p> margins in both columns (status is wrapped in <p> by the
   swagger.html script) so their first lines line up at the top. */
.swagger-ui .responses-table td.response-col_status p,
.swagger-ui .responses-table td.response-col_description p {
    margin: 0;
}


.swagger-ui section.models .model-container, .swagger-ui .model-box {
    background: #e8e8e8;
}

.swagger-ui .responses-inner {
    padding: 0;
}

/* After "Try it out" → Execute, Swagger renders a live result block (Curl,
   Request URL, "Server response" + the live table) inside .responses-inner.
   Keep its left/right padding at 0 so the live table lines up with the
   documented example table below (both draw their horizontal breathing room
   from the td cells via the .responses-table td rule, i.e. the "response"
   rows). Only vertical padding is applied here for spacing. */
.swagger-ui .responses-inner div:has(> .live-responses-table) {
    padding: 8px 0 16px;
}

/* The "Server response" heading is a bare <h4> directly inside the live block
   (Curl's own <h4> lives inside .curl-command, so "> h4" won't hit it). Give
   it a 12px left padding to line up with the live table's td indent. */
.swagger-ui .responses-inner div:has(> .live-responses-table) > h4 {
    padding-left: 12px;
}

/* Curl and Request URL are code blocks (no td of their own), so indent them
   with their own 12px left padding to line up with the Server response
   heading and the live table cells. */
.swagger-ui .responses-inner .curl-command,
.swagger-ui .responses-inner .request-url {
    padding-left: 12px;
}

/* Hide Swagger UI's built-in hover tooltip that shows a schema's resolved
   $ref. Because the spec is served from an absolute URL it resolves to a long
   "http://.../swagger.json#/components/schemas/..." string, which is noisy. */
.swagger-ui .model-hint {
    display: none;
}

/* Toast shown after clicking any copy button (see swagger.html). Plain green
   "Copied" confirmation by default; amber .is-key variant when the copied text
   contains the real API key, reminding the user to strip it before sharing.
   Anchored in document coordinates, so it lives outside .swagger-ui. */
.copy-toast {
    position: absolute;
    z-index: 9999;
    box-sizing: border-box;
    padding: 9px 13px;
    color: #fff;
    font-size: 12px;
    line-height: 1.55;
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    opacity: 1;
    transition: opacity .3s ease;
    pointer-events: none;
}
.copy-toast.is-plain {
    white-space: nowrap;
    background: #1f7a4d;
}
.copy-toast.is-key {
    width: 320px;
    white-space: normal;
    background: #664d03;
}
.copy-toast.is-leaving {
    opacity: 0;
}