:root {
    --notice-bg: #f8fafc;
    --notice-text: #17243a;
    --notice-muted: #4a5c73;
    --notice-border: #cbd5e1;
    --notice-shadow: 0 8px 26px rgba(15, 23, 42, .15);
    --notice-success: #047857;
    --notice-warning: #92400e;
    --notice-error: #b91c39;
    --notice-info: #1d4ed8;
}
:root[data-theme="dark"] {
    --notice-bg: #111e31;
    --notice-text: #f1f5ff;
    --notice-muted: #b6c7db;
    --notice-border: #344963;
    --notice-shadow: 0 8px 26px rgba(3, 8, 19, .42);
    --notice-success: #6ee7b7;
    --notice-warning: #fcd58a;
    --notice-error: #fda4b6;
    --notice-info: #a5c7ff;
}

.customer-notice.success, .customer-notice.tone-success { --notice-accent: var(--notice-success); }
.customer-notice.warning, .customer-notice.tone-warning { --notice-accent: var(--notice-warning); }
.customer-notice.error, .customer-notice.tone-danger { --notice-accent: var(--notice-error); }
.customer-notice {
    background: var(--notice-bg);
    color: var(--notice-text);
    border: 1px solid var(--notice-border);
    border-radius: 14px;
}
.customer-notice__lead {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.customer-notice__lead strong {
    color: var(--notice-text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}
.customer-notice .digex-storefront-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    font-size: 18px;
    line-height: 1;
    color: var(--notice-accent, var(--notice-info));
    background: color-mix(in srgb, var(--notice-accent, var(--notice-info)) 13%, var(--notice-bg));
}
.customer-notice__body, .customer-notice__context {
    display: block;
    color: var(--notice-muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.customer-notice [hidden] { display: none !important; }

#digex-storefront-toast, .customer-notice--inline {
    padding: 7px 11px;
    box-sizing: border-box;
    width: fit-content;
    max-width: min(360px, 100%);
    box-shadow: var(--notice-shadow);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
#digex-storefront-toast {
    position: fixed;
    z-index: 1080;
    top: max(82px, calc(env(safe-area-inset-top, 0px) + 72px));
    inset-inline-end: max(16px, env(safe-area-inset-right, 0px));
    max-width: min(360px, calc(100% - 32px));
    opacity: 0;
    transform: translateY(-5px);
}
#digex-storefront-toast.is-visible { opacity: 1; transform: none; }
#digex-storefront-toast.is-inline { position: relative; inset: auto; max-width: 100%; }
.customer-notice--inline.is-dismissing { opacity: 0; }
.customer-notice--inline .customer-notice__lead, #digex-storefront-toast .customer-notice__lead { vertical-align: top; }
#digex-storefront-toast {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 3px 10px;
}
#digex-storefront-toast .customer-notice__lead {
    display: contents;
}
#digex-storefront-toast :is(strong, .customer-notice__body, .customer-notice__context) {
    grid-column: 1;
    min-inline-size: 0;
}
#digex-storefront-toast strong {
    overflow-wrap: break-word;
}
#digex-storefront-toast .digex-storefront-toast-icon {
    grid-column: 2;
    grid-row: 1 / span 3;
}
#digex-storefront-toast.customer-notice--acceptance {
    padding: 11px 13px;
    min-width: min(210px, 100%);
}
#digex-storefront-toast.customer-notice--acceptance .digex-storefront-toast-icon {
    width: 30px;
    height: 30px;
}
#digex-storefront-toast:not(.is-inline) { max-height: 45dvh; }

.client-shell .client-alert.customer-notice { color: var(--notice-text); background: var(--notice-bg); }
.site-notification-dropdown .site-notification-item.customer-notice--list,
.notify-list .notify-item.customer-notice--list,
.pushbar_list .customer-notice--list {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 11px;
    border: 1px solid var(--notice-border);
    border-radius: 14px;
    background: var(--notice-bg);
    color: var(--notice-text);
    text-decoration: none;
    white-space: normal;
}
.site-notification-dropdown .site-notification-item.customer-notice--list.is-unread,
.notify-list .notify-item.customer-notice--list.is-unread,
.pushbar_list .customer-notice--list.is-unread {
    border-inline-start: 3px solid var(--notice-accent, var(--notice-info));
    background: color-mix(in srgb, var(--notice-bg) 93%, var(--notice-accent, var(--notice-info)));
}
.customer-notice--list .customer-notice__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: var(--notice-accent, var(--notice-info));
    background: color-mix(in srgb, var(--notice-accent, var(--notice-info)) 13%, var(--notice-bg));
    font-size: 19px;
    line-height: 1;
}
.customer-notice--list .customer-notice__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3px;
    min-width: 0;
    text-align: start;
}
.customer-notice--list .customer-notice__content > * {
    min-width: 0;
    word-break: normal;
    overflow-wrap: break-word;
}
.customer-notice--list .customer-notice__title {
    color: var(--notice-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}
.customer-notice--list.is-unread .customer-notice__title { font-weight: 900; }
.customer-notice--list :is(.customer-notice__subtitle, .customer-notice__detail, .customer-notice__time) {
    color: var(--notice-muted);
    font-size: 12px;
    line-height: 1.4;
}
.customer-notice--list .customer-notice__time { font-size: 11px; }
.customer-notice--list:focus-visible {
    outline: 2px solid var(--notice-accent, var(--notice-info));
    outline-offset: -2px;
}

@media (max-width: 575.98px) {
    #digex-storefront-toast {
        top: max(92px, calc(env(safe-area-inset-top, 0px) + 80px));
        inset-inline-end: max(12px, env(safe-area-inset-right, 0px));
        max-width: calc(100% - 24px);
    }
}
@media (prefers-reduced-motion: reduce) {
    #digex-storefront-toast, .customer-notice--inline { transition: none; transform: none; }
    .notify-item.customer-notice { transition: none; }
    .notify-item.customer-notice:hover { transform: none; }
}
