:root {
    --system-message-border-radius: 8px;
}

.alert {
    border-radius: var(--system-message-border-radius);
}

.app-alert {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    z-index: 1090;
    min-width: 300px;
    max-width: min(440px, calc(100vw - 24px));
    border-radius: var(--system-message-border-radius);
    visibility: visible;
    opacity: 1;
    transform: translate(0, 0);
    transform-origin: top right;
    filter: blur(0);
    box-shadow: 0 10px 30px rgba(1, 31, 75, 0.18);
    transition:
        opacity 520ms ease,
        transform 520ms cubic-bezier(0.4, 0, 0.2, 1),
        filter 520ms ease;
    animation: app-alert-enter 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-alert.app-alert--exiting {
    visibility: visible;
    opacity: 0;
    transform: translate(calc(100% + 32px), -8px) scale(0.96);
    filter: blur(2px);
    pointer-events: none;
}

@keyframes app-alert-enter {
    from {
        opacity: 0;
        transform: translate(48px, 0) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

@media (max-width: 768px) {
    .app-alert {
        top: 12px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto;
        min-width: 0;
        max-width: none;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-alert {
        animation: none;
        transition-duration: 1ms;
        filter: none;
    }
}
