/* Dialog (componente compartilhado): toasts de feedback temporário e a
 * modal usada para confirmações e avisos de sucesso/erro em qualquer página. */

/* Toasts: feedback temporário (sucesso/erro) no canto superior direito. */
.toasts {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: min(23.75rem, calc(100vw - 2.5rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    border: 0.0625rem solid;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visivel {
    opacity: 1;
    transform: none;
}

.toast.saindo {
    opacity: 0;
    transform: translateY(-0.5rem);
}

.toast-icone {
    flex-shrink: 0;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 50%;
    border: 0.125rem solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.toast-texto {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.toast-texto strong {
    font-size: 0.95rem;
}

.toast-texto span {
    font-size: 0.88rem;
    overflow-wrap: break-word;
}

.toast-fechar {
    margin-left: auto;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
    opacity: 0.7;
}

.toast-fechar:hover {
    opacity: 1;
}

.toast-sucesso {
    background: #e6f4ea;
    border-color: #b3dcc0;
    color: #1e6b34;
}

.toast-erro {
    background: #fdecee;
    border-color: #f2c4ca;
    color: #a52019;
}

/* Modal (confirmação e aviso de sucesso/erro). */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 30, 50, 0.55);
    animation: modal-surgir 0.18s ease;
}

.modal-confirm {
    width: min(27.5rem, 100%);
    background: var(--cor-superficie, #fff);
    border-radius: 0.875rem;
    padding: 1.5rem;
    box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: modal-surgir 0.18s ease;
}

.modal-icone {
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 auto 0.875rem;
    border-radius: 50%;
    background: #fdecee;
    color: var(--cor-erro, #b3261e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Ícone verde para o aviso de sucesso (o padrão é o vermelho de erro). */
.modal-icone-sucesso {
    background: #e6f4ea;
    color: var(--green-600, #1e6b34);
}

.modal-confirm h2 {
    margin: 0 0 0.375rem;
    font-size: 1.15rem;
}

.modal-confirm p {
    margin: 0 0 1.125rem;
    color: var(--cor-texto-suave, #5b6b7c);
    font-size: 0.95rem;
    overflow-wrap: break-word;
}

.modal-acoes {
    display: flex;
    justify-content: center;
    gap: 0.625rem;
}

/* Variantes de botão das ações da modal (excluir/desativar/ativar). */
.btn-perigo {
    background: var(--cor-erro, #b3261e);
    border-color: var(--cor-erro, #b3261e);
    color: #fff;
}

.btn-perigo:hover {
    filter: brightness(0.9);
}

/* Desativar — laranja: ação reversível, distinta do vermelho de
   exclusão e do azul de edição. */
.btn-atencao {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.btn-atencao:hover:not(:disabled) {
    filter: brightness(0.92);
}

/* Ativar — verde: devolve o conteúdo/conta ao estado ativo. */
.btn-sucesso {
    background: var(--green-500, #00a34f);
    border-color: var(--green-500, #00a34f);
    color: #fff;
}

.btn-sucesso:hover:not(:disabled) {
    filter: brightness(0.92);
}

.btn-atencao:disabled,
.btn-sucesso:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@keyframes modal-surgir {
    from { opacity: 0; transform: translateY(0.5rem) scale(0.97); }
    to { opacity: 1; transform: none; }
}

/* Modal do banner (lightbox): imagem grande + Baixar/Compartilhar/Fechar.
   No celular a caixa ocupa quase a tela toda, com a imagem rolando
   internamente se necessário. Compartilhada pelo painel (Admin) e pelo
   calendário público (Eventos). */
.banner-overlay {
    padding: 1rem;
}

.modal-banner {
    width: min(53.75rem, 100%);
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--cor-superficie, #fff);
    border-radius: 0.875rem;
    padding: 1rem;
    box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.3);
    animation: modal-surgir 0.18s ease;
}

.modal-banner h2 {
    margin: 0;
    font-size: 1.05rem;
}

.modal-banner img {
    width: 100%;
    flex: 1;
    min-height: 0;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #f3f6fb;
}

.banner-acoes {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
