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

element.style {
    display: flex;
    padding: 10px;
}

/* 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: 100vw;
    padding: 30px;
    height: 100vh;
    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 */
}

/* Container fixo para os toasts */
#generalAlertDialog {
    display: none; /* controlado pelo JS */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    background: transparent;
    pointer-events: none;
}

/* Caixa do alerta */
#generalAlertDialog .modal-content {
    pointer-events: auto;
    background-color: #fff;
    border-left: 5px solid;
    border-radius: 8px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-size: 14px;
    color: #333;
    animation: fadeInToast 0.4s ease-out forwards;
}

/* Sucesso */
#generalAlertDialog .alert-success {
    border-color: #28a745;
}
#generalAlertDialog .alert-success p {
    color: #28a745;
    margin: 0;
}

/* Erro */
#generalAlertDialog .alert-error {
    border-color: #dc3545;
}
#generalAlertDialog .alert-error p {
    color: #dc3545;
    margin: 0;
}

/* Botão de fechar no canto direito */
#generalAlertDialog .close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 16px;
    color: #888;
    border: none;
    background: transparent;
    cursor: pointer;
}

#generalAlertDialog .modal-footer {
    display: none; /* Oculta o rodapé */
}


/* Animações */
@keyframes fadeInToast {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutToast {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}
/* 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); }
}
