.messages.toast-region {
    position: fixed;
    top: auto;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(var(--site-footer-height, 0px) + max(18px, env(safe-area-inset-bottom)));
    left: auto;
    z-index: 5000;
    width: min(420px, calc(100vw - 36px));
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.messages.toast-region:empty {
    display: none;
}

.toast-notification {
    width: 100%;
    min-height: 64px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 13px 12px 13px 14px;
    overflow: hidden;
    border-width: 1px;
    border-radius: 12px;
    background: #11141a;
    box-shadow: 0 18px 52px rgba(0, 0, 0, .45);
    color: #f7f8fb;
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.4;
    opacity: 0;
    pointer-events: auto;
    transform: translate3d(22px, 14px, 0);
    transition: opacity .22s ease, transform .22s ease;
}

.toast-notification.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.toast-notification.is-leaving {
    opacity: 0;
    transform: translate3d(22px, 0, 0);
}

.toast-notification .toast-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: currentColor;
    font-size: .9rem;
    font-weight: 950;
}

.toast-notification .toast-content {
    min-width: 0;
}

.toast-notification .toast-content p {
    margin: 0;
}

.toast-notification .toast-close {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    opacity: .72;
}

.toast-notification .toast-close:hover,
.toast-notification .toast-close:focus-visible {
    background: rgba(255, 255, 255, .1);
    opacity: 1;
}

.toast-notification.alert-error {
    border-color: #ef4444;
    background: #3a151b;
    color: #ffd2d5;
}

.toast-notification.alert-success {
    border-color: #22c55e;
    background: #102d1b;
    color: #c9f8d8;
}

.toast-notification.alert-development,
.toast-notification.alert-info {
    border-color: #3b82f6;
    background: #10233f;
    color: #d7e7ff;
}

html[data-theme="light"] .toast-notification {
    border-color: #c9d5e8;
    background: #ffffff;
    color: #10203b;
    box-shadow: 0 18px 46px rgba(19, 44, 86, .2);
}

html[data-theme="light"] .toast-notification.alert-error {
    border-color: #dc2626;
    background: #fff1f2;
    color: #991b1b;
}

html[data-theme="light"] .toast-notification.alert-success {
    border-color: #16a34a;
    background: #ecfdf3;
    color: #166534;
}

html[data-theme="light"] .toast-notification.alert-development,
html[data-theme="light"] .toast-notification.alert-info {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
}

@media (max-width: 560px) {
    .messages.toast-region {
        right: max(12px, env(safe-area-inset-right));
        bottom: calc(var(--site-footer-height, 0px) + max(12px, env(safe-area-inset-bottom)));
        width: calc(100vw - 24px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast-notification {
        transition: opacity .01ms linear;
        transform: none;
    }
}
