/* CordenaAi API - Custom Swagger UI Styles */

/* Header personalizado */
.swagger-ui .topbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 3px solid #4facfe;
}

.swagger-ui .topbar .download-url-wrapper {
    display: none;
}

/* Logo personalizado */
.swagger-ui .topbar .topbar-wrapper .link {
    content: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iOCIgZmlsbD0iIzRlYWNmZSIvPgo8cGF0aCBkPSJNMTIgMTJIMjhWMjhIMTJWMTJaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNMTYgMTZIMjRWMjBIMTZWMjBaIiBmaWxsPSIjNjY3ZWVhIi8+CjxwYXRoIGQ9Ik0xNiAyMkgyNFYyNkgxNlYyMloiIGZpbGw9IiM3NjRiYTIiLz4KPC9zdmc+');
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Título da API */
.swagger-ui .info .title {
    color: #667eea;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.swagger-ui .info .description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Botões de operação */
.swagger-ui .opblock.opblock-get .opblock-summary-method {
    background: #4facfe;
}

.swagger-ui .opblock.opblock-post .opblock-summary-method {
    background: #00d4aa;
}

.swagger-ui .opblock.opblock-put .opblock-summary-method {
    background: #f39c12;
}

.swagger-ui .opblock.opblock-delete .opblock-summary-method {
    background: #e74c3c;
}

/* Cards de operação */
.swagger-ui .opblock {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    border: 1px solid #e1e5e9;
}

.swagger-ui .opblock.opblock-get {
    border-left: 4px solid #4facfe;
}

.swagger-ui .opblock.opblock-post {
    border-left: 4px solid #00d4aa;
}

.swagger-ui .opblock.opblock-put {
    border-left: 4px solid #f39c12;
}

.swagger-ui .opblock.opblock-delete {
    border-left: 4px solid #e74c3c;
}

/* Seções de tags */
.swagger-ui .opblock-tag {
    border-bottom: 2px solid #667eea;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.swagger-ui .opblock-tag small {
    color: #667eea;
    font-weight: 600;
}

/* Botão Authorize */
.swagger-ui .btn.authorize {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swagger-ui .btn.authorize:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Garantir que o botão de autenticação seja sempre visível */
.swagger-ui .auth-container,
.swagger-ui .auth-wrapper,
.swagger-ui .auth-btn-wrapper {
    display: block !important;
    visibility: visible !important;
}

/* Estilo para o ícone de cadeado */
.swagger-ui .auth-wrapper .btn.authorize svg {
    fill: white;
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

/* Garantir que o modal de autenticação funcione */
.swagger-ui .auth-container .auth-btn-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Modelos */
.swagger-ui .model-container {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Código de exemplo */
.swagger-ui .highlight-code {
    background: #2d3748;
    border-radius: 6px;
    color: #e2e8f0;
}

/* Responsividade */
@media (max-width: 768px) {
    .swagger-ui .info .title {
        font-size: 2rem;
    }
    
    .swagger-ui .opblock {
        margin: 0.5rem;
    }
}

/* Animações */
.swagger-ui .opblock-summary {
    transition: all 0.3s ease;
}

.swagger-ui .opblock-summary:hover {
    background: #f8f9fa;
}

/* Badge de versão */
.swagger-ui .info .version {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-left: 1rem;
}

/* Melhorias nos campos de entrada */
.swagger-ui .parameters .parameter__name {
    color: #667eea;
    font-weight: 600;
}

.swagger-ui .parameters .parameter__type {
    color: #764ba2;
    font-weight: 500;
}

/* Status codes */
.swagger-ui .responses-inner h4 {
    color: #667eea;
    font-weight: 600;
}

/* Combobox de navegação por categoria */
.category-navigator {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    padding: 15px;
    min-width: 250px;
}

.category-navigator h4 {
    margin: 0 0 10px 0;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
}

.category-navigator select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-navigator select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.category-navigator select:hover {
    border-color: #667eea;
}

/* Ocultar botão "Gerar Dados de Teste" */
.swagger-ui .btn-download,
.swagger-ui .download-url-wrapper,
.swagger-ui .btn[title*="Gerar Dados de Teste"],
.swagger-ui .btn[title*="gerar dados de teste"],
.swagger-ui .btn[title*="Gerar"],
.swagger-ui .btn[title*="gerar"] {
    display: none !important;
}

/* Ocultar qualquer botão que contenha "teste" ou "dados" no texto */
.swagger-ui .btn:contains("teste"),
.swagger-ui .btn:contains("dados"),
.swagger-ui .btn:contains("Gerar") {
    display: none !important;
}

/* Footer personalizado */
.swagger-ui .footer {
    background: #f8f9fa;
    border-top: 2px solid #667eea;
    padding: 1rem;
    text-align: center;
    color: #666;
}

.swagger-ui .footer::before {
    content: "🚀 CordenaAi API - Desenvolvido com ❤️ pela InMinds Technology";
    font-weight: 600;
    color: #667eea;
}

/* Responsividade para a combobox */
@media (max-width: 768px) {
    .category-navigator {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        width: calc(100% - 20px);
    }
}
