html.ag-avisos-ativos .ui-messages {
    display: none !important;
}

#ag-avisos {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 100002;
    width: min(380px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ag-aviso {
    --ag-aviso-cor: var(--ag-primary);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 16px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--ag-surface) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--ag-aviso-cor) 28%, var(--ag-border));
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .18);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    color: var(--ag-text);
    overflow: hidden;
    pointer-events: auto;
    touch-action: pan-y;
    animation: ag-aviso-entrar .5s cubic-bezier(.22, 1.4, .36, 1) both;
    transition: transform .2s ease, opacity .2s ease;
}

.ag-aviso::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--ag-aviso-cor) 16%, transparent), transparent 55%);
    pointer-events: none;
}

.ag-aviso-sucesso {
    --ag-aviso-cor: var(--ag-primary);
}

.ag-aviso-info {
    --ag-aviso-cor: #60a5fa;
}

.ag-aviso-aviso {
    --ag-aviso-cor: #f59e0b;
}

.ag-aviso-erro {
    --ag-aviso-cor: var(--ag-danger, #f87171);
}

.ag-aviso-conquista {
    --ag-aviso-cor: var(--ag-primary);
}

.ag-aviso-icone {
    position: relative;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--ag-aviso-cor) 18%, transparent);
    color: var(--ag-aviso-cor);
    font-size: .95rem;
}

.ag-aviso-icone .pi {
    font-weight: 700;
}

.ag-aviso-conquista .ag-aviso-icone {
    background: var(--ag-aviso-cor);
    color: var(--ag-primary-contrast, #0f0f0f);
    animation: ag-aviso-trofeu .9s cubic-bezier(.34, 1.56, .64, 1) .15s both;
}

.ag-aviso-corpo {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 1px;
}

.ag-aviso-corpo strong {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
}

.ag-aviso-corpo span {
    font-size: .83rem;
    color: var(--ag-text-muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ag-aviso-acao {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--ag-aviso-cor);
    color: var(--ag-primary-contrast, #0f0f0f) !important;
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), filter .15s ease;
}

.ag-aviso-acao span {
    color: inherit !important;
    font-size: inherit !important;
}

.ag-aviso-acao:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.ag-aviso-fechar {
    position: relative;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ag-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .7;
    transition: background .15s ease, opacity .15s ease, color .15s ease;
}

.ag-aviso-fechar .pi {
    font-size: .7rem;
}

.ag-aviso-fechar:hover {
    opacity: 1;
    background: var(--ag-surface-alt);
    color: var(--ag-text);
}

.ag-aviso-tempo {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--ag-aviso-cor);
    opacity: .55;
    transform-origin: left center;
    animation: ag-aviso-tempo linear forwards paused;
}

.ag-aviso-saindo {
    animation: ag-aviso-sair .42s cubic-bezier(.4, 0, .2, 1) forwards;
    pointer-events: none;
}

@keyframes ag-aviso-entrar {
    from {
        opacity: 0;
        transform: translateX(40px) scale(.92);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ag-aviso-sair {
    0% {
        opacity: 1;
        transform: none;
        max-height: var(--ag-aviso-altura, 120px);
        margin-bottom: 0;
    }
    55% {
        opacity: 0;
        transform: translateX(60px) scale(.96);
        max-height: var(--ag-aviso-altura, 120px);
    }
    100% {
        opacity: 0;
        transform: translateX(60px) scale(.96);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: -10px;
        border-width: 0;
    }
}

@keyframes ag-aviso-tempo {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

@keyframes ag-aviso-trofeu {
    0% {
        transform: scale(.3) rotate(-25deg);
    }
    100% {
        transform: none;
    }
}

:root[data-theme="light"] .ag-aviso {
    box-shadow: 0 14px 34px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .08);
}

@media (max-width: 640px) {
    #ag-avisos {
        top: auto;
        bottom: 14px;
        right: 50%;
        transform: translateX(50%);
        width: calc(100vw - 24px);
        flex-direction: column-reverse;
    }

    @keyframes ag-aviso-entrar {
        from {
            opacity: 0;
            transform: translateY(30px) scale(.94);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .ag-aviso,
    .ag-aviso-saindo,
    .ag-aviso-conquista .ag-aviso-icone {
        animation-duration: .01ms !important;
    }
}

@media (min-width: 641px) {
    .ag-admin-body #ag-avisos {
        top: 84px;
    }
}