/* ---------------------------------------------------------------------------
   Sunfly orange theme for the partner API docs (v1 and v2).

   Injected into both Swagger UI pages via InjectStylesheet, so the theme lives
   in one file and the two documents match. Chrome only — the topbar, the action
   buttons, section headers, links and focus states. HTTP method badges keep
   their standard colours so GET and POST stay instantly readable.
   --------------------------------------------------------------------------- */
:root {
    --sf-orange: #ef7d00;
    --sf-orange-dark: #c96500;
    --sf-orange-light: #ff9d3f;
    --sf-ink: #3d2c10;
}

.swagger-ui .topbar {
    background: linear-gradient(90deg, var(--sf-orange-dark), var(--sf-orange));
    box-shadow: 0 2px 8px rgba(201, 101, 0, .25);
}
/* The stock topbar shows a Swagger logo and a URL box we do not use. */
.swagger-ui .topbar .download-url-wrapper { display: none; }
.swagger-ui .topbar .link img { display: none; }
.swagger-ui .topbar .link::after {
    content: "SUNFLY PARTNER API";
    color: #fff;
    font-weight: 700;
    letter-spacing: .06em;
    font-size: 15px;
}

/* Primary action buttons */
.swagger-ui .btn.execute {
    background: var(--sf-orange);
    border-color: var(--sf-orange);
}
.swagger-ui .btn.execute:hover { background: var(--sf-orange-dark); }
.swagger-ui .btn.authorize {
    color: var(--sf-orange-dark);
    border-color: var(--sf-orange);
}
.swagger-ui .btn.authorize svg { fill: var(--sf-orange-dark); }

/* Section + operation chrome */
.swagger-ui .opblock-tag { color: var(--sf-ink); }
.swagger-ui .opblock.is-open .opblock-summary { border-bottom-color: var(--sf-orange-light); }
.swagger-ui .info .title { color: var(--sf-orange-dark); }
.swagger-ui .info a,
.swagger-ui a.nostyle,
.swagger-ui .scheme-container .schemes > label { color: var(--sf-orange-dark); }
.swagger-ui .model-title { color: var(--sf-ink); }

/* Descriptions: the numbered partner flow reads better with a touch of spacing */
.swagger-ui .info .description code {
    background: #fff6ec;
    color: var(--sf-orange-dark);
    border: 1px solid #ffe2c2;
    padding: 1px 5px;
    border-radius: 4px;
}

/* Auth modal + focus accents */
.swagger-ui .dialog-ux .modal-ux-header { background: var(--sf-orange); }
.swagger-ui .dialog-ux .modal-ux-header h3 { color: #fff; }
.swagger-ui .authorization__btn { color: var(--sf-orange-dark); }
.swagger-ui input:focus,
.swagger-ui textarea:focus,
.swagger-ui select:focus {
    border-color: var(--sf-orange-light);
    outline-color: var(--sf-orange-light);
}
.swagger-ui .tab li.active { color: var(--sf-orange-dark); }

/* ---------------------------------------------------------------------------
   The navigation bar added by swagger-links.js.

   Styled here rather than inline so the two injected files stay one theme, and
   so an operator can restyle it without touching script.
   --------------------------------------------------------------------------- */
#sf-swagger-links {
    background: var(--sf-ink);
    color: #f4e9d8;
    font-family: sans-serif;
    font-size: 13px;
}

#sf-swagger-links .sf-links-inner {
    max-width: 1460px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    justify-content: space-between;
}

#sf-swagger-links .sf-links-title {
    opacity: .8;
}

#sf-swagger-links .sf-links-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
}

#sf-swagger-links a {
    color: #ffd9ab;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}

#sf-swagger-links a:hover {
    border-bottom-color: currentColor;
}

/* The sign-in link. Every endpoint below needs a credential, and this is
   where a partner gets one. */
#sf-swagger-links a.sf-primary {
    background: var(--sf-orange);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 600;
    border-bottom: 0;
}

#sf-swagger-links a.sf-primary:hover {
    background: var(--sf-orange-light);
}
