/* =================================================================== */
/* --- ESTILOS PARA O ALERTA "TOAST" (#generalAlertDialog) --- */
/* =================================================================== */
:root {
    --alert-success: #cbffcb;
    --alert-error: #ffcbcb; /* Para o '*' de campo obrigatório */
}

/* 1. Posiciona o container do toast no canto inferior direito */
#generalAlertDialog {
    display: none; /* Controlado pelo JS */
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent; /* Fundo invisível */
    pointer-events: none; /* Permite clicar através */
    justify-content: flex-end; /* Alinha à direita */
    align-items: flex-end; /* Alinha na base */
}

/* 2. O .modal-content é o toast visível */
#generalAlertDialog .modal-content {
    position: relative;
    margin: 20px;
    max-width: 400px;
    width: auto;
    pointer-events: auto; /* Torna o toast clicável */
    background-color: #e9ecef;
    border: 1px solid #e8e8e3;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    /* Animações serão aplicadas dinamicamente */
}

#generalAlertDialog .modal-content.alert-success {
    background-color: var(--alert-success);
    border-color: var(--alert-success);
}

#generalAlertDialog .modal-content.alert-error {
    background-color: var(--alert-error);
    border-color: var(--alert-error);
}

/* 3. Esconde o rodapé APENAS no modal de alerta */
#generalAlertDialog .modal-footer {
    display: none;
}

/* Animações do Toast */
#generalAlertDialog.is-visible .modal-content {
    animation: fadeInToast 0.4s ease-out forwards;
}
#generalAlertDialog .modal-content.modal-exit-animation {
    animation: slideOutRight 0.5s ease-in forwards;
}


/* ======================================================================= */
/* --- ESTILOS PARA O MODAL DE CONFIRMAÇÃO (#generalConfirmationModal) --- */
/* ======================================================================= */

/* 1. Define a aparência do pop-up centralizado */
#generalConfirmationModal {
    display: none; /* Controlado pelo JS */
    position: fixed;
    z-index: 1050;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Fundo semi-transparente */
    justify-content: center; /* Centraliza horizontalmente */
    align-items: center; /* Centraliza verticalmente */
}

/* 2. O .modal-content é a caixa de diálogo */
#generalConfirmationModal .modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    text-align: left;
    /* Animações serão aplicadas dinamicamente */
}

/* 3. Garante que o rodapé e os botões estejam visíveis e alinhados */
#generalConfirmationModal .modal-footer {
    display: flex;
    justify-content: flex-end; /* Alinha botões à direita */
    gap: 10px; /* Espaço entre os botões */
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
}

/* Animações do Modal de Confirmação */
#generalConfirmationModal.is-visible .modal-content {
    animation: fadeInModal 0.3s ease-out forwards;
}
#generalConfirmationModal .modal-content.modal-exit-animation {
    animation: fadeOutModal 0.3s ease-out forwards;
}


/* ======================================================================= */
/* --- ESTILOS COMUNS E ANIMAÇÕES --- */
/* ======================================================================= */

/* Estilos de header e body compartilhados */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
}
.modal-header h5 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}
.modal-body {
    padding: 20px;
}
.modal-body p {
    margin: 0;
    line-height: 1.6;
}
.close {
    font-size: 1.5rem;
    font-weight: 700;
    color: #999;
    background: transparent;
    border: none;
    cursor: pointer;
}

/* Keyframes das animações */
@keyframes fadeInToast {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(120%); }
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeOutModal {
    from { opacity: 1; transform: scale(1) translateY(0); }
    to { opacity: 0; transform: scale(0.95) translateY(-10px); }
}
