/* Aviso do site público (substitui o toast SweetAlert2). Desktop: topo direito abaixo da navbar; mobile: rodapé, largura total. */
.aviso-pilha {
    --aviso-sucesso: #16a34a;
    --aviso-alerta: #d97706;
    --aviso-erro: #dc2626;
    position: fixed;
    z-index: 100000;
    top: var(--aviso-topo, 96px);
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
.aviso {
    --cor: var(--aviso-sucesso);
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 44px 18px 16px;
    background: #fff;
    color: #1f2937;
    border-radius: 14px;
    border-left: 6px solid var(--cor);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .1);
    pointer-events: auto;
    touch-action: pan-y;
    animation: aviso-entra .35s cubic-bezier(.2, .9, .3, 1.1) both;
}
.aviso--alerta { --cor: var(--aviso-alerta); }
.aviso--erro { --cor: var(--aviso-erro); }
.aviso.saindo { animation: aviso-sai .25s ease-in both; }
.aviso__icone {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--cor);
    background: color-mix(in srgb, var(--cor) 14%, #fff);
}
.aviso__corpo { min-width: 0; flex: 1; }
.aviso__titulo { margin: 0 0 2px; font-size: 16px; font-weight: 700; line-height: 1.3; color: #111827; }
.aviso__texto { margin: 0; font-size: 15px; line-height: 1.45; color: #4b5563; overflow-wrap: anywhere; }
.aviso__texto ul { margin: 4px 0 0; padding-left: 18px; }
.aviso__fechar {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    cursor: pointer;
}
.aviso__fechar:hover, .aviso__fechar:focus-visible { background: #f3f4f6; color: #111827; }
.aviso__barra {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--cor);
    opacity: .55;
    transform-origin: left;
    animation: aviso-barra linear both;
    animation-duration: var(--duracao, 7s);
}
.aviso:hover .aviso__barra, .aviso.pausado .aviso__barra { animation-play-state: paused; }

@keyframes aviso-entra { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes aviso-sai { to { opacity: 0; transform: translateX(32px); } }
@keyframes aviso-barra { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 767px) {
    .aviso-pilha {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        padding: 0 12px calc(12px + env(safe-area-inset-bottom));
    }
    .aviso { border-left-width: 0; border-top: 5px solid var(--cor); padding: 16px 48px 20px 16px; animation-name: aviso-entra-m; }
    .aviso.saindo { animation-name: aviso-sai-m; }
    .aviso__titulo { font-size: 17px; }
    .aviso__texto { font-size: 16px; }
    .aviso__fechar { width: 40px; height: 40px; top: 6px; right: 6px; font-size: 17px; }
}
@keyframes aviso-entra-m { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes aviso-sai-m { to { opacity: 0; transform: translateY(40px); } }

@media (prefers-reduced-motion: reduce) {
    .aviso, .aviso.saindo { animation-duration: .01s; }
    .aviso__barra { display: none; }
}
