/* ═══════════════════════════════════════════════════════════════════════
   WBOS ERP API - Custom Swagger UI Styling
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Hide Swagger Default Branding ────────────────────────────────────── */

/* Hide default Swagger logo image */
.swagger-ui .topbar-wrapper .link img {
    display: none !important;
}

/* Hide the "Swagger Petstore" text */
.swagger-ui .topbar-wrapper .link span {
    display: none !important;
}

/* Hide ALL Swagger branding elements */
.swagger-ui .topbar-wrapper .link {
    background: none !important;
}

.swagger-ui .topbar-wrapper .link::after {
    display: none !important;
}

/* Hide the Swagger info section if it exists */
.swagger-ui .info .link {
    display: none !important;
}

/* ── Insert WBOS Logo ─────────────────────────────────────────────────── */

.swagger-ui .topbar-wrapper .link:before {
    content: "";
    display: block;
    width: 180px;
    height: 45px;
    background: url("/API-logo.png") no-repeat center center;
    background-size: contain;
}

/* Make sure only our logo shows */
.swagger-ui .topbar-wrapper img {
    display: none !important;
}

.swagger-ui .topbar-wrapper svg {
    display: none !important;
}

/* Hide "Swagger" branding next to dropdown */
.swagger-ui .topbar .download-url-wrapper {
    display: none !important;
}

/* Hide any remaining Swagger text in the info section */
.swagger-ui .info hgroup.main a {
    display: none !important;
}

/* Hide the green Swagger icon/badge */
.swagger-ui span[data-swagger-link] {
    display: none !important;
}

/* Target the specific Swagger SmartBear branding */
a[href="http://smartbear.com"],
a[href*="swagger.io"] {
    display: none !important;
}

/* ── Top Bar Styling ──────────────────────────────────────────────────── */

.swagger-ui .topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-bottom: 3px solid #5568d3;
    padding: 12px 0;
}

/* ── Customize Colors to Match WBOS Branding ──────────────────────────── */

/* Primary buttons (Execute, Authorize, etc.) */
.swagger-ui .btn.execute {
    background-color: #667eea !important;
    border-color: #667eea !important;
}

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

/* Authorization button - Soft beige/tan tone */
.swagger-ui .btn.authorize {
    background-color: #d4a373 !important;  /* Soft tan/beige like in screenshot */
    border-color: #c99561 !important;
    color: white !important;
    font-weight: 600 !important;
}

.swagger-ui .btn.authorize:hover {
    background-color: #c99561 !important;
    border-color: #b88550 !important;
}

.swagger-ui .btn.authorize svg {
    fill: white !important;
}

/* Locked/Unlocked icons - softer red */
.swagger-ui .btn.authorize.unlocked {
    background-color: #e89b8a !important;  /* Softer coral/red */
    border-color: #d88a77 !important;
}

.swagger-ui .btn.authorize.unlocked:hover {
    background-color: #d88a77 !important;
    border-color: #c87966 !important;
}

/* Operation tags (GET, POST, PUT, DELETE colors) */
.swagger-ui .opblock.opblock-get .opblock-summary-method {
    background: #48bb78 !important;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
    background: #667eea !important;
}

.swagger-ui .opblock.opblock-put .opblock-summary-method {
    background: #ed8936 !important;
}

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

/* ── Info Section Styling ─────────────────────────────────────────────── */

.swagger-ui .info .title {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 700;
}

.swagger-ui .info .description {
    color: #4a5568;
    line-height: 1.6;
}

/* ── Schema & Model Styling ───────────────────────────────────────────── */

.swagger-ui .model-box {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.swagger-ui .model-title {
    color: #2d3748;
    font-weight: 600;
}

/* ── Response Headers ─────────────────────────────────────────────────── */

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

/* ── Try It Out Section ───────────────────────────────────────────────── */

.swagger-ui .try-out__btn {
    background-color: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

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

/* ── Parameter Input Fields ───────────────────────────────────────────── */

.swagger-ui .parameters-col_description input[type=text],
.swagger-ui .parameters-col_description select,
.swagger-ui .parameters-col_description textarea {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem;
    transition: border-color 0.2s;
}

.swagger-ui .parameters-col_description input[type=text]:focus,
.swagger-ui .parameters-col_description select:focus,
.swagger-ui .parameters-col_description textarea:focus {
    border-color: #667eea !important;
    outline: none;
}

/* ── Response Section ─────────────────────────────────────────────────── */

.swagger-ui .responses-inner h4,
.swagger-ui .responses-inner h5 {
    color: #2d3748;
    font-weight: 600;
}

/* Success response highlight */
.swagger-ui .response .response-col_status {
    font-size: 1.1rem;
}

/* ── Authentication Modal ─────────────────────────────────────────────── */

.swagger-ui .dialog-ux .modal-ux-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

.swagger-ui .dialog-ux .modal-ux-header h3 {
    color: white;
}

/* ── Scrollbar Styling ────────────────────────────────────────────────── */

.swagger-ui ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

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

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

/* ── Optional: Add subtle animations ──────────────────────────────────── */

.swagger-ui .opblock-summary:hover {
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transition: box-shadow 0.2s;
}

/* ── Print/PDF friendly ───────────────────────────────────────────────── */

@media print {
    .swagger-ui .topbar {
        background: white !important;
        border-bottom: 2px solid #2d3748 !important;
    }

    .swagger-ui .topbar-wrapper .link:before {
        background: url("/API-logo.png") no-repeat left center !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   END OF CUSTOM STYLING
   ═══════════════════════════════════════════════════════════════════════ */
