.flash-notifications {
    --flash-top: 4.75rem;
    position: absolute;
    top: var(--flash-top);
    right: max(.5rem, env(safe-area-inset-right));
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: min(29rem, 100% - 1rem);
    max-height: calc(100vh - var(--flash-top) - 1rem);
    max-height: calc(100dvh - var(--flash-top) - 1rem);
    margin: 0;
    padding: .5rem;
    overflow: auto;
    overscroll-behavior: contain;
    pointer-events: none;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left;
}

.flash-notifications--marketing { --flash-top: 6.5rem; }
.flash-notifications--demo { --flash-top: 7.5rem; }

.flash-notification {
    --flash-color: #2459b8;
    --flash-tint: #edf3ff;
    position: relative;
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) 2.75rem;
    align-items: start;
    gap: .75rem;
    flex: 0 0 auto;
    padding: 1rem .5rem 1rem 1rem;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--flash-color);
    border-radius: 1rem;
    background: #fff;
    color: #334155;
    box-shadow: 0 4px 10px rgb(15 23 42 / 10%);
    pointer-events: auto;
    animation: flash-notification-enter .2s ease-out;
}

.flash-notification--success { --flash-color: #087752; --flash-tint: #e8f7ef; }
.flash-notification--warning { --flash-color: #946000; --flash-tint: #fff4d9; }
.flash-notification--danger { --flash-color: #bd3549; --flash-tint: #fff0f2; }

.flash-notification__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .8rem;
    background: var(--flash-tint);
    color: var(--flash-color);
}

.flash-notification__icon svg { width: 1.25rem; height: 1.25rem; }
.flash-notification__content { min-width: 0; overflow-wrap: anywhere; }
.flash-notification .flash-notification__title {
    margin: 0 0 .25rem;
    color: #172033;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.4;
}
.flash-notification__message { font-size: .875rem; line-height: 1.55; }
.flash-notification__message > :last-child { margin-bottom: 0; }
.flash-notification__message ul { padding-left: 1.25rem; }
.flash-notification__message code { white-space: normal; overflow-wrap: anywhere; }

.flash-notification .flash-notification__close {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin: -.375rem 0 0;
    padding: 0;
    border: 0;
    border-radius: .75rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    box-shadow: none;
}
.flash-notification__close svg { width: .875rem; height: .875rem; }
.flash-notification .flash-notification__close:hover { background: #f1f5f9; color: #172033; }
.flash-notification__close:focus-visible { outline: 2px solid var(--flash-color); outline-offset: -2px; }

@keyframes flash-notification-enter {
    from { opacity: 0; transform: translateY(-.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575.98px) {
    .flash-notification { gap: .5rem; padding-left: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
    .flash-notification { animation: none; }
}
