:root {
    --announcement-strip-height: 40px;
}

.storefront-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

.storefront-top > .store-header {
    position: static;
}

.announcement-strip {
    width: 100%;
    height: var(--announcement-strip-height);
    background: #264737;
    color: #fffdf8;
    font-size: 14px;
}

.storefront-top:has(> .announcement-strip) + main {
    --catalog-scroll-extra: var(--announcement-strip-height);
}

.storefront-top:has(> .announcement-strip) + main > .hero {
    margin-top: 0;
}

.announcement-strip__inner {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.announcement-strip__track {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.announcement-strip__message {
    position: absolute;
    inset-inline-start: 0;
    width: max-content;
    white-space: nowrap;
}

.announcement-strip__track[data-static] .announcement-strip__message {
    position: static;
    width: 100%;
    overflow: hidden;
    padding-inline: 12px;
    text-overflow: ellipsis;
}

.announcement-strip__inner > button {
    position: absolute;
    z-index: 1;
    inset-block-start: 2px;
    inset-inline-end: 8px;
    display: grid;
    place-items: center;
    min-width: 30px;
    height: calc(var(--announcement-strip-height) - 4px);
    padding-inline: 6px;
    border-radius: 4px;
    background: #264737;
    color: inherit;
    white-space: nowrap;
}

/* Keyboard users can reveal the controls without reserving space in the strip. */
.announcement-strip__inner > button:not(:focus-visible) {
    width: 1px;
    min-width: 0;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

.announcement-strip__inner > button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

.announcement-strip__dialog {
    width: min(480px, 92vw);
    background: #fffdf8;
    color: #243e32;
    font-size: 1rem;
    line-height: 1.5;
}

.announcement-strip__dialog h2 {
    margin-block: 0 12px;
}

.announcement-strip__dialog ul {
    padding-inline-start: 22px;
    overflow-wrap: anywhere;
}

.announcement-strip__dialog li + li {
    margin-top: 8px;
}

.announcement-strip__dialog form {
    text-align: end;
}

@media (max-width: 700px) {
    :root {
        --announcement-strip-height: 30px;
    }

    .announcement-strip {
        font-size: 12px;
    }
}
