/**
 * Estilos para operações AJAX (exclusão e edição sem recarregar a página)
 */

/* Estilizar botões de ações */
.btn-group-sm .btn {
    margin-right: 2px;
}

.btn-group-sm .btn:last-child {
    margin-right: 0;
}

/* Estilizar botão de edição */
.btn-edit {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-edit:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* Estilizar botão de exclusão */
.btn-excluir {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-excluir:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Estilizar container de mensagens flash */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

.alert-container .alert {
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilizar modal de edição */
#editModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#editModal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Estilizar linhas da tabela */
tr[data-id] {
    transition: background-color 0.3s ease;
}

tr[data-id]:hover {
    background-color: #f8f9fa;
}

/* Efeito de destaque para linha atualizada */
tr.highlight {
    background-color: #ffffcc !important;
    transition: background-color 2s ease;
}

/* Efeito de remoção para linha excluída */
tr.removing {
    opacity: 0;
    height: 0;
    transition: all 0.5s ease;
}

/* Estilizar botões no modo de busca */
.btn-group-sm .btn i {
    margin-right: 0;
}

@media (min-width: 768px) {
    .btn-group-sm .btn i {
        margin-right: 5px;
    }
    
    .btn-group-sm .btn {
        min-width: 80px;
    }
}
