.notifications {
    --notification-accent: #466784;
    --notification-tint: #edf4fa;
    color: #303746;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 12px 15px 16px;
    margin-bottom: 12px;
    border: 1px solid #dce1e8;
    border-left: 4px solid var(--notification-accent);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 20px #2730440d;
    font-size: .875rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.notification-success { --notification-accent: #2d7656; --notification-tint: #eaf5ee; }
.notification-error { --notification-accent: #c23b35; --notification-tint: #fceeea; }
.notification-warning { --notification-accent: #916416; --notification-tint: #fff5df; }
.notification-info { --notification-accent: #466784; --notification-tint: #edf4fa; }

.notification-icon {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--notification-tint);
    color: var(--notification-accent);
    font-size: 1rem;
    font-weight: 800;
}

.notification-copy { min-width: 0; flex: 1; padding-top: 2px; }
.notification-copy strong { display: block; margin-bottom: 3px; color: #303746; }
.notification-copy p { margin: 0; white-space: pre-line; }
.notification-timing { margin-top: 10px; color: #636a76; font-size: .6875rem; font-variant-numeric: tabular-nums; }
.notification-progress {
    display: block;
    width: 100%;
    height: 3px;
    margin-top: 5px;
    border: 0;
    border-radius: 3px;
    overflow: hidden;
    appearance: none;
    background: var(--notification-tint);
    color: var(--notification-accent);
}
.notification-progress::-webkit-progress-bar { background: var(--notification-tint); }
.notification-progress::-webkit-progress-value { background: var(--notification-accent); }
.notification-progress::-moz-progress-bar { background: var(--notification-accent); }
.notification-close {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: -8px -5px -8px 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #636a76;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.notification-close:hover { color: #303746; background: #f2f4f7; }
.notification-close:focus-visible { outline: 3px solid #e85243; outline-offset: 1px; }
.notifications [hidden] { display: none !important; }

.notifications.is-enhanced {
    position: fixed;
    top: max(20px, env(safe-area-inset-top));
    right: max(20px, env(safe-area-inset-right));
    z-index: 1200;
    width: min(410px, calc(100vw - 40px));
    max-height: min(70vh, 42rem);
    max-height: min(70dvh, 42rem);
    padding: 3px;
    overflow-y: auto;
    overscroll-behavior: contain;
    pointer-events: none;
}
.is-enhanced .notification {
    margin-bottom: 10px;
    box-shadow: 0 8px 28px #27304424;
    pointer-events: auto;
}
.notification-queue-note {
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: #3b404e;
    color: #fff;
    font-size: .75rem;
    pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
    .is-enhanced .notification { animation: notification-in .18s ease-out; }
    @keyframes notification-in {
        from { opacity: 0; transform: translateY(-6px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

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

@media (max-width: 575.98px) {
    .notifications.is-enhanced {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        width: auto;
        max-height: 55vh;
        max-height: 55dvh;
    }
    .notification { padding: 12px 10px 12px 12px; gap: 10px; }
}
