/* Custom Swagger UI Styling for DIP 2FA API */

/* Header styling */
.swagger-ui .topbar {
    background-color: #1b4332 !important;
    border-bottom: 3px solid #2d6a4f;
}

.swagger-ui .topbar .download-url-wrapper {
    display: none;
}

/* Custom banner for API key info */
.swagger-ui::before {
    /* content: "🔐 Admin API Access Required - Use the Authorize button to enter your API key"; */
    display: block;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Authorize button styling */
.swagger-ui .btn.authorize {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border: none;
    color: white;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.swagger-ui .btn.authorize:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.swagger-ui .btn.authorize svg {
    fill: white;
}

/* API key input styling */
.swagger-ui .auth-container .auth-wrapper .auth-method .apikey-auth input[type="text"] {
    border: 2px solid #3498db;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    width: 100%;
    background-color: #f8f9fa;
}

.swagger-ui .auth-container .auth-wrapper .auth-method .apikey-auth input[type="text"]:focus {
    border-color: #2980b9;
    outline: none;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Security requirements styling */
.swagger-ui .scheme-container .auth-wrapper .auth-description {
    background-color: #e8f5e8;
    border-left: 4px solid #27ae60;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
}

/* Highlight secured endpoints */
.swagger-ui .opblock.opblock-post {
    border-left: 4px solid #e74c3c;
}

.swagger-ui .opblock.opblock-delete {
    border-left: 4px solid #e74c3c;
}

.swagger-ui .opblock.opblock-get.secured {
    border-left: 4px solid #f39c12;
}

/* Response status styling */
.swagger-ui .response-col_status .response-undocumented {
    font-weight: bold;
}

/* Selective security indicators - Show lock icon only for secured endpoints */
.swagger-ui .opblock .opblock-summary-description:before {
    content: "🔓 ";
    font-size: 14px;
    margin-right: 5px;
}

/* Show lock icon for secured endpoints (Apps and BlockedIP) using tag-based selectors */
.swagger-ui .opblock-tag-section[data-tag="Apps"] .opblock .opblock-summary-description:before,
.swagger-ui .opblock-tag-section[data-tag="BlockedIP"] .opblock .opblock-summary-description:before {
    content: "🔒 " !important;
    color: #e74c3c;
}

/* Alternative approach - target by path patterns */
.swagger-ui .opblock[id*="/api/Apps"] .opblock-summary-description:before,
.swagger-ui .opblock[id*="/api/BlockedIP"] .opblock-summary-description:before {
    content: "🔒 " !important;
    color: #e74c3c;
}

/* Enhanced styling for secured endpoints by tag section */
.swagger-ui .opblock-tag-section[data-tag="Apps"] .opblock,
.swagger-ui .opblock-tag-section[data-tag="BlockedIP"] .opblock {
    border-left: 4px solid #e74c3c !important;
    background-color: #fdf2f2;
}

.swagger-ui .opblock-tag-section[data-tag="Apps"] .opblock .opblock-summary,
.swagger-ui .opblock-tag-section[data-tag="BlockedIP"] .opblock .opblock-summary {
    background-color: #f8e8e8;
}

/* Keep TwoFactorAuth endpoints with open lock styling */
.swagger-ui .opblock-tag-section[data-tag="TwoFactorAuth"] .opblock {
    border-left: 4px solid #27ae60 !important;
    background-color: #f0f8f0;
}

.swagger-ui .opblock-tag-section[data-tag="TwoFactorAuth"] .opblock .opblock-summary {
    background-color: #e8f5e8;
}

/* Fallback approach - target by operation summary text content */
.swagger-ui .opblock-summary:has(.opblock-summary-path[data-path*="/api/Apps"]) .opblock-summary-description:before,
.swagger-ui .opblock-summary:has(.opblock-summary-path[data-path*="/api/BlockedIP"]) .opblock-summary-description:before {
    content: "🔒 " !important;
    color: #e74c3c;
}

/* Footer info */
.swagger-ui::after {
    /* content: "💡 Tip: Development API Key for testing: DIP-Admin-Dev-Key-2025"; */
    display: block;
    background: #3498db;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    margin-top: 30px;
    border-radius: 8px;
    font-family: monospace;
}