/**
 * -------------------------------------------------------------------------
 * Intranet IA plugin for GLPI - Login Page Styles
 * -------------------------------------------------------------------------
 */

/* Validação de campos */
.form-control.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.form-control.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Indicador de força da senha */
.password-strength-indicator {
    margin-top: 5px;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Dicas de login */
.login-tip {
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Melhorias gerais para o formulário de login */
.card-login .card-body {
    padding: 2rem !important;
}

.form-group label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Efeitos de hover e foco */
.form-control:hover {
    border-color: #b3d7ff !important;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Responsividade para telas pequenas */
@media (max-width: 576px) {
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .ia-login-features {
        flex-direction: column;
        gap: 10px;
    }
    
    .login-tip {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    #dify-chatbot-bubble-window {
        width: calc(100vw - 40px) !important;
        height: 60vh !important;
        left: 20px !important;
        right: 20px !important;
    }
}

/* Animações adicionais */
.card-login {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ia-feature {
    transition: all 0.3s ease;
}

.ia-feature:hover {
    transform: scale(1.05);
    color: #495057;
}

/* Loading state para botão de login */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
