/* Estilos para validação de formulários e notificações */

/* Campo com erro */
.error-field {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25) !important;
}

/* Mensagem de erro */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Notificações */
.form-notification {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out forwards;
}

.form-notification.success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.form-notification.error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification-icon {
    font-size: 24px;
    margin-right: 15px;
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* Animações */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-out {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Indicador de sucesso para campos válidos */
.valid-field {
    border-color: #28a745 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Estilo para estados de loading durante envio do formulário */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mensagem de sucesso após envio do formulário */
.success-message {
    text-align: center;
    padding: 30px;
}

.success-message i {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
}

.success-message h3 {
    color: #155724;
    margin-bottom: 15px;
}

.success-message p {
    color: #5a6268;
}