/**
 * Estilos para Alteração de Senha - Estilo ContaAzul - alterar_senha.css
 * 
 * @author Claudio Felix - Mappersona Consultoria
 */

/* Container principal */
#form_alterar_senha {
    max-width: 550px;
    margin: 40px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

/* Logo/Título */
#form_alterar_senha .panel-heading {
    text-align: center;
    background: transparent !important;
    border: none !important;
    padding: 0 0 30px 0;
}

#form_alterar_senha .panel-title {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

/* Textos informativos */
.info-text {
    color: #5a6c7d;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: block;
}

.info-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.info-text-small {
    color: #8597a8;
    font-size: 13px;
    margin-bottom: 25px;
    display: block;
}

.info-text-bold {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
    margin: 25px 0 20px 0;
    display: block;
}

/* Campos de formulário */
#form_alterar_senha .form-group label {
    color: #2c3e50;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

#form_alterar_senha .form-control {
    height: 44px;
    border: 1px solid #d5dce3;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.2s ease;
}

#form_alterar_senha .form-control:focus {
    border-color: #00a8e8;
    box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.1);
    outline: none;
}

#form_alterar_senha .form-control::placeholder {
    color: #b0b9c2;
}

/* Campo código 2FA */
.codigo-2fa {
    font-size: 20px !important;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* Wrapper de senha com ícone */
.form-group > div[style*="position:relative"] {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8597a8;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s ease;
    z-index: 10;
}

.toggle-password:hover {
    color: #5a6c7d;
}

/* Link reenviar código */
.reenviar-codigo {
    text-align: center;
    margin: 15px 0 25px 0;
}

.reenviar-codigo a {
    color: #00a8e8;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.reenviar-codigo a:hover {
    color: #0088c0;
    text-decoration: underline;
}

#timer-reenvio {
    color: #8597a8;
    font-size: 13px;
    margin-left: 5px;
}

/* Divisor */
.senha-divisor {
    height: 1px;
    background: #e8ecef;
    margin: 30px 0;
}

/* Requisitos de senha */
.senha-requisitos {
    background: #f7f9fa;
    border: 1px solid #e8ecef;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 15px 0 25px 0;
}

.senha-requisito-label {
    color: #5a6c7d;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.requisito {
    color: #8597a8;
    font-size: 13px;
    padding: 4px 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.requisito i {
    color: #c5d0db;
    margin-right: 8px;
    font-size: 14px;
    transition: color 0.2s ease;
}

.requisito.valido {
    color: #28a745;
}

.requisito.valido i {
    color: #28a745;
}

.requisito.invalido {
    color: #dc3545;
}

.requisito.invalido i {
    color: #dc3545;
}

/* Botões */
#form_alterar_senha .btn {
    height: 44px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    padding: 0 24px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

#form_alterar_senha .btn-success {
    background: #28a745;
    color: #fff;
}

#form_alterar_senha .btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

#form_alterar_senha .btn-default {
    background: #fff;
    color: #5a6c7d;
    border: 1px solid #d5dce3;
}

#form_alterar_senha .btn-default:hover {
    background: #f7f9fa;
    border-color: #b0b9c2;
}

#form_alterar_senha .btn-block {
    width: 100%;
    margin-top: 10px;
}

/* Grupo de botões */
#form_alterar_senha .form-group:last-child {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    margin-bottom: 0;
}

#form_alterar_senha .form-group:last-child .btn {
    flex: 1;
}

/* Mensagens de erro/sucesso */
.alert {
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-danger {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.alert-info {
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    color: #2c5282;
}

/* Responsividade */
@media (max-width: 768px) {
    #form_alterar_senha {
        margin: 20px;
        padding: 24px;
    }
    
    #form_alterar_senha .panel-title {
        font-size: 20px;
    }
    
    .btn-block-mobile {
        width: 100% !important;
    }
    
    #form_alterar_senha .form-group:last-child {
        flex-direction: column;
    }
    
    #form_alterar_senha .form-group:last-child .btn {
        width: 100%;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#form_alterar_senha {
    animation: fadeIn 0.3s ease;
}

/* Loading spinner (opcional) */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* Estados desabilitados */
#form_alterar_senha .form-control:disabled {
    background: #f7f9fa;
    color: #8597a8;
    cursor: not-allowed;
}

#form_alterar_senha .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#form_alterar_senha .btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Melhorias de acessibilidade */
#form_alterar_senha .form-control:focus {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

#form_alterar_senha .btn:focus {
    outline: 2px solid #00a8e8;
    outline-offset: 2px;
}

/* Estilos para telas de alta resolução */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #form_alterar_senha {
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    }
}