.store-notify {
    --announcement-bg: #1f2937;
    --announcement-fg: #fff;
    align-items: center;
    background: var(--announcement-bg);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14);
    color: var(--announcement-fg);
    display: none;
    inset-block-start: 0;
    inset-inline: 0;
    justify-content: center;
    min-height: 42px;
    opacity: 0;
    padding-block: 7px;
    padding-inline: 56px;
    position: fixed;
    transition: opacity 160ms ease;
    width: 100%;
    z-index: 3500;
}

.store-notify.is-visible {
    opacity: 1;
}

.store-notify--animated {
    transform: translateY(-6px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.store-notify--animated.is-visible {
    transform: translateY(0);
}

/*
 * Scrolling ticker. The pre-v2 bar offered "ثابت / متحرك" and the moving
 * option ran the message across the bar continuously; merchants who chose it
 * expect that, not a one-off entrance. It runs on text-only announcements,
 * because a coupon button or countdown cannot be clicked while it moves.
 */
/* A ticker sweeps the whole strip, so it opts out of the centred reading
   column the static bar uses; otherwise the message appears and disappears
   mid-bar with dead gutters at both ends. */
.store-notify--scrolling .store-notify__inner {
    max-width: none;
}

.store-notify--scrolling .store-notify__message {
    display: block;
    overflow: hidden;
    width: 100%;
}

/*
 * translateX percentages resolve against the TRANSLATED element, not its
 * container, so animating the message alone moved it by its own width and it
 * never cleared either edge. Padding the track by one container width makes
 * the track (container + message) wide, so a full -100%/+100% sweep carries
 * the message from one edge clean off the other, at any message length.
 */
.store-notify--scrolling .store-notify__scroll {
    align-items: center;
    animation: store-notify-scroll 25s linear infinite;
    display: inline-flex;
    gap: 9px;
    padding-inline-start: 100%;
    white-space: nowrap;
    will-change: transform;
}

.store-notify--scrolling .store-notify__text {
    overflow-wrap: normal;
    white-space: nowrap;
}

.store-notify--scrolling:hover .store-notify__scroll,
.store-notify--scrolling:focus-within .store-notify__scroll {
    animation-play-state: paused;
}

/* Latin reading order: enters at the right edge, exits at the left. */
@keyframes store-notify-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

[dir="rtl"] .store-notify--scrolling .store-notify__scroll {
    animation-name: store-notify-scroll-rtl;
}

/* Arabic reading order: enters at the left edge, exits at the right. */
@keyframes store-notify-scroll-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.store-notify__inner {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-inline: auto;
    max-width: 1200px;
    min-width: 0;
    width: 100%;
}

.store-notify__message {
    align-items: center;
    display: flex;
    gap: 9px;
    justify-content: center;
    min-width: 0;
}

.store-notify__icon {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 15px;
    justify-content: center;
    line-height: 1;
}

.store-notify__icon img {
    height: 22px;
    object-fit: contain;
    width: auto;
}

.store-notify__text {
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    overflow-wrap: anywhere;
    text-align: center;
}

.store-notify__cta,
.store-notify__coupon,
.store-notify__countdown {
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: inherit;
    display: inline-flex;
    flex: 0 0 auto;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    gap: 7px;
    line-height: 1.2;
    min-height: 28px;
    padding: 5px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.store-notify__cta:hover,
.store-notify__cta:focus,
.store-notify__coupon:hover,
.store-notify__coupon:focus {
    background: rgba(255, 255, 255, 0.23);
    color: inherit;
    text-decoration: none;
}

.store-notify__cta:focus-visible,
.store-notify__coupon:focus-visible,
.store-notify__close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.store-notify__coupon {
    cursor: pointer;
}

.store-notify__coupon.is-copied {
    background: rgba(22, 163, 74, 0.65);
}

.store-notify__coupon-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
}

.store-notify__countdown {
    cursor: default;
}

.store-notify__countdown-label {
    opacity: 0.88;
}

.store-notify__countdown-time {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.store-notify__close {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 0;
    border-radius: 6px;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 20px;
    height: 30px;
    inset-inline-end: 10px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    transition: background-color 140ms ease;
    width: 30px;
}

.store-notify__close:hover {
    background: rgba(255, 255, 255, 0.23);
}

.clear-notification {
    height: 0;
    transition: margin-bottom 180ms ease;
}

.desktop-header-active .is-sticky.has-notification .desktop-main-menu-wrapper {
    top: var(--announcement-height, 42px);
}

.mobile-header-active .sticky-bar {
    position: inherit;
}

.mobile-header-active .sticky-bar.mobile-bar-sticky {
    position: fixed;
}

@media (max-width: 767px) {
    .store-notify {
        min-height: 48px;
        padding-block: 8px;
        padding-inline: 48px;
    }

    .store-notify__inner {
        flex-wrap: wrap;
        gap: 7px 10px;
    }

    .store-notify__message {
        flex: 1 1 100%;
    }

    .store-notify__text {
        font-size: 13px;
        line-height: 1.45;
        max-width: 100%;
    }

    .store-notify__cta,
    .store-notify__coupon,
    .store-notify__countdown {
        min-height: 27px;
        padding-block: 4px;
    }

    .store-notify__close {
        height: 34px;
        inset-inline-end: 7px;
        width: 34px;
    }
}

@media (max-width: 380px) {
    .store-notify {
        padding-inline: 43px;
    }

    .store-notify__icon {
        font-size: 14px;
    }

    .store-notify__text {
        font-size: 12.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-notify,
    .clear-notification,
    .store-notify__close {
        transition: none;
    }

    /* The container-width padding only exists to give the sweep its runway;
       without the animation it would push the message off the strip. */
    .store-notify--scrolling .store-notify__scroll {
        animation: none;
        justify-content: center;
        padding-inline-start: 0;
        transform: none;
        width: 100%;
    }

    .store-notify--scrolling .store-notify__message {
        overflow: visible;
    }

    .store-notify--scrolling .store-notify__text {
        overflow-wrap: anywhere;
        white-space: normal;
    }
}
