.app-notification-stack {
    position: fixed;
    z-index: 2050;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: min(25rem, calc(100vw - 2rem));
    gap: .75rem;
    pointer-events: none;
}

.swal2-popup.app-confirm-dialog {
    width: min(26rem, calc(100vw - 2rem));
    padding: clamp(1.1rem, 3vw, 1.6rem);
    border-radius: 1rem;
    font-size: .92rem;
}

.app-confirm-dialog .swal2-title {
    padding: .25rem .5rem 0;
    font-size: clamp(1.1rem, 4vw, 1.35rem);
}

.app-confirm-dialog .swal2-html-container {
    margin: .75rem 0 0;
    font-size: .9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.app-confirm-dialog .swal2-actions {
    gap: .55rem;
    margin-top: 1.1rem;
}

.app-confirm-dialog .swal2-styled {
    min-width: 5.25rem;
    min-height: 2.5rem;
    margin: 0;
    padding: .55rem 1rem;
    border-radius: .65rem;
    font-size: .88rem;
}

.app-notification {
    --notification-accent: #173e52;
    position: relative;
    overflow: hidden;
    border: 0;
    border-left: 4px solid var(--notification-accent);
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17, 39, 54, .18);
    color: #173047;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(1rem);
    transition: opacity .22s ease, transform .22s ease;
}

.app-notification.show { opacity: 1; transform: translateX(0); }
.app-notification:not(.show) { transform: translateX(1rem); }
.app-notification[data-type="success"] { --notification-accent: #168d70; }
.app-notification[data-type="error"] { --notification-accent: #c74737; }
.app-notification[data-type="warning"] { --notification-accent: #d28722; }
.app-notification[data-type="info"],
.app-notification[data-type="status"] { --notification-accent: #173e70; }

.app-notification .toast-body {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1rem .95rem;
}

.app-notification-icon {
    flex: 0 0 auto;
    color: var(--notification-accent);
    font-size: 1.25rem;
    line-height: 1.2;
}

.app-notification-copy {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.app-notification-title {
    display: block;
    margin-bottom: .15rem;
    color: #173047;
    font-size: .875rem;
    font-weight: 700;
}

.app-notification-message {
    color: #5c6975;
    font-size: .84rem;
    line-height: 1.4;
}

.app-notification-close {
    flex: 0 0 auto;
    margin: -.15rem -.2rem 0 0;
    opacity: .55;
}

.app-notification-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--notification-accent);
    transform-origin: left;
    animation: notification-progress 3s linear forwards;
}

@keyframes notification-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
    .app-notification-stack {
        top: .65rem;
        right: .65rem;
        left: .65rem;
        width: auto;
    }

    .app-notification .toast-body {
        padding: .8rem .85rem .9rem;
    }

    .app-notification,
    .app-notification:not(.show) {
        transform: translateY(-.5rem);
    }

    .app-notification.show { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .app-notification-progress { animation-duration: .01ms; }
    .app-notification { transition: none; }
}

.storefront-notification-center {
    position: relative;
    flex: 0 0 auto;
}

.storefront-notification-toggle {
    position: relative;
    list-style: none;
}

.storefront-notification-toggle::-webkit-details-marker {
    display: none;
}

.storefront-notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    place-items: center;
    border: 2px solid #173e52;
    border-radius: 999px;
    background: #e85555;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.storefront-notification-dropdown {
    position: absolute;
    z-index: 1200;
    top: calc(100% + 12px);
    right: 0;
    width: min(390px, calc(100vw - 24px));
    max-height: min(70vh, 560px);
    overflow: auto;
    border: 1px solid #e6ebef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(17, 39, 54, .2);
    color: #173047;
}

.storefront-notification-dropdown-heading {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 12px 14px 12px 16px;
    border-bottom: 1px solid #edf0f3;
    background: #fff;
}

.storefront-notification-heading-copy {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .65rem;
}

.storefront-notification-heading-copy > strong {
    color: #173047;
    font-size: .98rem;
}

.storefront-notification-heading-copy > span {
    color: #63717d;
    font-size: .78rem;
}

.storefront-notification-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 50%;
    background: #f3f6f8;
    color: #64727d;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.storefront-notification-close:hover,
.storefront-notification-close:focus-visible {
    border-color: #dce5eb;
    background: #eaf0f4;
    color: #173047;
}

.storefront-notification-close:focus-visible,
.storefront-notification-explore:focus-visible {
    outline: 3px solid rgba(39, 129, 187, .28);
    outline-offset: 2px;
}

.storefront-notification-list {
    display: grid;
}

.storefront-notification-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px;
    border-bottom: 1px solid #edf0f3;
}

.storefront-notification-item.is-unread {
    background: #f5f9fc;
}

.storefront-notification-copy {
    min-width: 0;
    flex: 1;
    overflow-wrap: anywhere;
}

.storefront-notification-item-heading {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: #173047;
    line-height: 1.35;
}

.storefront-notification-open-form,
.storefront-notification-explore-form {
    margin: 0;
}

.storefront-notification-title-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #173047;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    text-align: left;
}

.storefront-notification-title-link:hover {
    color: #176f9d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.storefront-notification-title-link:focus-visible {
    border-radius: 2px;
    outline: 3px solid rgba(39, 129, 187, .28);
    outline-offset: 2px;
}

.storefront-notification-item p {
    margin: .35rem 0 .4rem;
    color: #53616d;
    font-size: .88rem;
    line-height: 1.5;
    white-space: pre-line;
}

.storefront-notification-item time {
    color: #84909a;
    font-size: .75rem;
}

.storefront-notification-unread-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #2781bb;
}

.storefront-notification-actions {
    display: grid;
    justify-items: start;
    flex: 0 0 auto;
    gap: .45rem;
}

.storefront-notification-actions form {
    margin: 0;
}

.storefront-notification-read {
    padding: 0;
    border: 0;
    background: transparent;
    color: #2672a4;
    font-size: .78rem;
    white-space: nowrap;
}

.storefront-notification-read:hover,
.storefront-notification-all:hover {
    color: #144e76;
    text-decoration: underline;
}

.storefront-notification-explore {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border: 1px solid #d5e9f5;
    border-radius: 8px;
    background: #eff8fc;
    color: #17668f;
    cursor: pointer;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}

.storefront-notification-explore:hover {
    transform: translateY(-1px);
    border-color: #176f9d;
    background: #176f9d;
    color: #fff;
}

.storefront-notification-explore .bi {
    font-size: .78rem;
}

.storefront-notification-explore-form {
    margin: .65rem 0 .45rem;
}

.storefront-notification-all {
    display: block;
    padding: 13px 16px;
    color: #2672a4;
    font-size: .86rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.storefront-notification-empty {
    margin: 0;
    padding: 24px 16px;
    color: #74808a;
    font-size: .9rem;
    text-align: center;
}

.customer-notifications-page {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.customer-notifications-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.customer-notifications-card {
    overflow: hidden;
    border: 1px solid #e6ebef;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(17, 39, 54, .06);
}

.customer-notifications-card .storefront-notification-item {
    padding: 20px 22px;
}

.customer-push-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 16px 18px;
    border: 1px solid #dceaf2;
    border-radius: 14px;
    background: linear-gradient(120deg, #f4fbff, #fff);
}

.customer-push-control-copy {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .8rem;
}

.customer-push-control-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    background: #e4f3fb;
    color: #176f9d;
    font-size: 1.15rem;
}

.customer-push-control-copy strong {
    display: block;
    color: #173047;
    font-size: .95rem;
}

.customer-push-control-copy p {
    margin: .2rem 0 0;
    color: #64727d;
    font-size: .82rem;
    line-height: 1.4;
}

.customer-push-control-copy .customer-push-device-hint {
    color: #7b8993;
    font-size: .72rem;
}

.customer-push-control-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .6rem;
}

.customer-push-enable,
.customer-push-disable {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .5rem .85rem;
    border: 1px solid #176f9d;
    border-radius: 8px;
    background: #176f9d;
    color: #fff;
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

.customer-push-enable:hover,
.customer-push-disable:hover {
    border-color: #125778;
    background: #125778;
    color: #fff;
}

.customer-push-enable:disabled,
.customer-push-disable:disabled {
    cursor: wait;
    opacity: .65;
}

.customer-push-disable {
    border-color: #d7e0e6;
    background: #fff;
    color: #526371;
}

.customer-push-status {
    flex-basis: 100%;
    margin: 0;
    color: #64727d;
    font-size: .76rem;
}

.customer-push-control.is-compact {
    display: block;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #edf0f3;
    border-radius: 0;
    background: #f7fbfd;
}

.customer-push-control.is-compact .customer-push-control-copy {
    align-items: flex-start;
}

.customer-push-control.is-compact .customer-push-control-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 9px;
    font-size: .95rem;
}

.customer-push-control.is-compact .customer-push-control-copy strong {
    font-size: .84rem;
}

.customer-push-control.is-compact .customer-push-control-copy p {
    font-size: .76rem;
}

.customer-push-control.is-compact .customer-push-control-actions {
    margin: .65rem 0 0 42px;
}

.customer-push-control.is-compact .customer-push-enable,
.customer-push-control.is-compact .customer-push-disable {
    min-height: 34px;
    padding: .4rem .65rem;
    font-size: .76rem;
}

.customer-push-control.is-compact .customer-push-status {
    margin: .45rem 0 0 42px;
}

.customer-notifications-pagination {
    padding: 16px 20px 4px;
}

.customer-notifications-empty {
    padding: clamp(2.5rem, 8vw, 5rem) 1rem;
    color: #74808a;
    text-align: center;
}

.customer-notifications-empty > .bi {
    display: block;
    margin-bottom: .75rem;
    color: #94a4b0;
    font-size: 2rem;
}

.customer-notifications-empty h2 {
    color: #173047;
}

@media (max-width: 575.98px) {
    .storefront-notification-dropdown {
        position: fixed;
        top: 72px;
        right: 12px;
        width: calc(100vw - 24px);
    }

    .storefront-notification-item,
    .customer-notifications-card .storefront-notification-item {
        gap: .65rem;
        padding: 14px;
    }

    .storefront-notification-actions .btn {
        --bs-btn-padding-y: .25rem;
        --bs-btn-padding-x: .45rem;
        font-size: .74rem;
    }

    .storefront-notification-item {
        flex-direction: column;
    }

    .storefront-notification-actions {
        width: 100%;
        grid-template-columns: repeat(2, max-content);
        align-items: center;
    }

    .storefront-notification-heading-copy {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
    }

    .customer-notifications-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .customer-notifications-heading .btn {
        width: 100%;
    }

    .customer-push-control:not(.is-compact) {
        align-items: flex-start;
        flex-direction: column;
        gap: .8rem;
        padding: 14px;
    }

    .customer-push-control:not(.is-compact) .customer-push-control-actions {
        width: 100%;
    }

    .customer-push-control:not(.is-compact) .customer-push-enable,
    .customer-push-control:not(.is-compact) .customer-push-disable {
        width: 100%;
    }
}
