.ajax_response:empty { display: none; }

.site-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    width: 300px;
    max-width: calc(100vw - 40px);
    pointer-events: none;
}

/* Toasts: dark rounded card with a colored icon badge, white text and a progress bar in the type color.
   The selectors start with "body" so they also win over the admin's own .message styles. */
.site-notifications { --toast-accent: #4488ef; width: 340px; }

body .site-notifications .message {
    --toast-accent: #4488ef;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0 0 12px;
    padding: 14px 44px 18px 14px;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 18px;
    background: rgb(14 17 24 / 96%);
    color: #eef2f9;
    font-family: var(--font-body, "Manrope", sans-serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    overflow-wrap: anywhere;
    box-shadow: 0 18px 44px rgb(0 0 0 / 45%), inset 4px 0 0 var(--toast-accent);
    backdrop-filter: blur(12px);
    pointer-events: auto;
    cursor: pointer;
}

body .site-notifications .message::before {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--toast-accent) 22%, transparent);
    color: var(--toast-accent);
    font-size: 17px;
    line-height: 1;
}

body .site-notifications .message.success { --toast-accent: #34c98a; }
body .site-notifications .message.info { --toast-accent: #4488ef; }
body .site-notifications .message.warning { --toast-accent: #f2b63d; }
body .site-notifications .message.error { --toast-accent: #f06565; }

body .site-notifications .message_time {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: var(--toast-accent);
    opacity: .9;
    transform-origin: left;
    animation: notification-time linear forwards;
}

.site-notifications__close {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #aab3c6;
    font: 22px/1 sans-serif;
    cursor: pointer;
    transition: color .15s;
}
.site-notifications__close:hover { color: #fff; }

.site-notifications__close:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
@keyframes notification-time { from { transform: scaleX(0.04); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .site-notifications .message_time { animation: none; } }
