/* Shared storefront notifications: independent of the active theme and Bootstrap. */
.ts-storefront-notices {
    --ts-notice-top: max(16px, env(safe-area-inset-top, 0px));
    --ts-notice-right: max(16px, env(safe-area-inset-right, 0px));
    --ts-notice-left: max(16px, env(safe-area-inset-left, 0px));
    --ts-notice-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    position: fixed;
    top: var(--ts-notice-top);
    right: var(--ts-notice-right);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-sizing: border-box;
    width: min(400px, calc(100vw - var(--ts-notice-left) - var(--ts-notice-right)));
    max-height: calc(100vh - var(--ts-notice-top) - var(--ts-notice-bottom));
    max-height: calc(100dvh - var(--ts-notice-top) - var(--ts-notice-bottom));
    padding: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    pointer-events: none;
    color: rgb(var(--bs-body-color-rgb, 33, 37, 41));
    font-family: inherit;
    text-align: start;
}

.ts-storefront-notices:empty { display: none; }

.ts-storefront-notices .ts-storefront-notice {
    --ts-notice-accent: 45, 117, 210;
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 16px 12px 17px 14px;
    overflow: hidden;
    border: 1px solid rgba(var(--bs-body-color-rgb, 33, 37, 41), .16);
    border-top-color: rgba(255, 255, 255, .5);
    border-left: 3px solid rgba(var(--ts-notice-accent), .85);
    border-radius: 16px;
    background: rgb(var(--bs-body-bg-rgb, 255, 255, 255));
    box-shadow: 0 1px 2px rgba(0, 0, 0, .16),
        inset 0 1px 0 rgba(255, 255, 255, .55),
        inset 1px 0 0 rgba(255, 255, 255, .2),
        inset 0 -1px 0 rgba(0, 0, 0, .12);
    color: inherit;
    font-size: 14px;
    line-height: 1.45;
    pointer-events: auto;
}

.ts-storefront-notices .ts-storefront-notice[data-notice-type="success"] { --ts-notice-accent: 32, 153, 100; }
.ts-storefront-notices .ts-storefront-notice[data-notice-type="danger"] { --ts-notice-accent: 220, 65, 79; }
.ts-storefront-notices .ts-storefront-notice[data-notice-type="warning"] { --ts-notice-accent: 213, 148, 24; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ts-storefront-notices .ts-storefront-notice {
        background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 65%),
            rgba(var(--bs-body-bg-rgb, 255, 255, 255), .74);
        -webkit-backdrop-filter: blur(20px) saturate(140%);
        backdrop-filter: blur(20px) saturate(140%);
    }
}

.ts-storefront-notices .ts-storefront-notice__icon {
    display: grid;
    flex: 0 0 28px;
    place-items: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(var(--ts-notice-accent), .4);
    border-radius: 50%;
    background: rgba(var(--ts-notice-accent), .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.ts-storefront-notices .ts-storefront-notice__content { flex: 1 1 auto; min-width: 0; }
.ts-storefront-notices .ts-storefront-notice__title {
    display: block;
    margin: 1px 0 4px;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.ts-storefront-notices .ts-storefront-notice__message {
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.ts-storefront-notices .ts-storefront-notice__close {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    margin: -6px -5px 0 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.ts-storefront-notices .ts-storefront-notice__close[hidden] { display: none !important; }
.ts-storefront-notices .ts-storefront-notice__close:hover { background: rgba(var(--bs-body-color-rgb, 33, 37, 41), .09); }
.ts-storefront-notices .ts-storefront-notice__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
    background: rgba(var(--bs-body-color-rgb, 33, 37, 41), .09);
}

.ts-storefront-notices .ts-storefront-notice__progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(var(--ts-notice-accent), .7);
    transform: scaleX(1);
    transform-origin: left center;
    opacity: 0;
    pointer-events: none;
}
.ts-storefront-notices .ts-storefront-notice.is-timed .ts-storefront-notice__progress { opacity: .8; }
.ts-storefront-notices .ts-storefront-notice.is-entering { animation: ts-storefront-notice-enter 180ms ease-out both; }
.ts-storefront-notices .ts-storefront-notice.is-leaving {
    animation: ts-storefront-notice-leave 160ms ease-in both;
    pointer-events: none;
}

@keyframes ts-storefront-notice-enter {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ts-storefront-notice-leave {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .ts-storefront-notices .ts-storefront-notice.is-entering,
    .ts-storefront-notices .ts-storefront-notice.is-leaving { animation: none; }
    .ts-storefront-notices .ts-storefront-notice__progress { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
    .ts-storefront-notices .ts-storefront-notice {
        background: rgb(var(--bs-body-bg-rgb, 255, 255, 255));
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
}

@media (forced-colors: active) {
    .ts-storefront-notices .ts-storefront-notice {
        border: 1px solid CanvasText;
        background: Canvas;
        color: CanvasText;
        box-shadow: none;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }
    .ts-storefront-notices .ts-storefront-notice__progress { display: none; }
}
