/* High-confidence localized-store suggestion (geo-store-suggest.js).
   One DOM path: desktop renders an in-flow bar under the sticky header,
   mobile turns the same node into a fixed non-modal bottom sheet. */

.ds-geo-suggest {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 14px 48px;
    background: var(--ds-primary-light-color-light);
    border-bottom: 1px solid var(--ds-border-color-light);
    color: var(--ds-dark-text-color);
    font-size: 15px;
    line-height: 1.4;
}

.ds-geo-suggest__text {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
    text-align: center;
}

.ds-geo-suggest__title {
    font-weight: 600;
    font-size: 16px;
}

.ds-geo-suggest__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ds-geo-suggest__btn {
    white-space: nowrap;
    padding: 14px 28px;
    font-size: 16px;
    line-height: 1.2;
}

.ds-geo-suggest__close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 0 6px;
    border: 0;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--ds-light-text-color-light);
    cursor: pointer;
}

.ds-geo-suggest__close:hover {
    color: var(--ds-dark-text-color);
}

.ds-geo-suggest__close svg {
    display: block;
}

/* Desktop bar overlays the page instead of pushing it down. The suggestion is
   fetched after first paint and only some visitors get one, so an in-flow bar
   moved the whole page by its own height when it appeared (layout shift 0.125 on
   the homepage, the hero jumped ~177px) and moved it back when it was dismissed.
   The slot is now a zero-height anchor directly under the header and the bar
   hangs from it, so it appears and disappears without changing any layout.
   z-index stays below the sticky header (12300) so its menus cover the bar.
   Mobile keeps its fixed bottom sheet (below). */
@media (min-width: 768px) {
    #mm-geo-suggest-slot {
        position: relative;
        height: 0;
        z-index: 1025;
    }

    #mm-geo-suggest-slot .ds-geo-suggest {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        box-shadow: var(--ds-medium-shadow);
    }
}

@media (max-width: 767.98px) {
    /* Non-modal bottom sheet: no backdrop, no scroll lock, page stays usable. */
    .ds-geo-suggest {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1035; /* above sticky-top (1030), below modals (1050+) */
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
        border-bottom: 0;
        border-top: 1px solid var(--ds-border-color-light);
        box-shadow: var(--ds-dark-shadow);
        animation: ds-geo-suggest-in 0.25s ease-out;
    }

    .ds-geo-suggest__text {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding-right: 28px;
    }

    .ds-geo-suggest__title {
        font-size: 16px;
    }

    .ds-geo-suggest__actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* Comfortable tap targets: button-small is sized for desktop rows. */
    .ds-geo-suggest__actions .ds-geo-suggest__btn {
        text-align: center;
        padding: 12px 16px;
        font-size: 15px;
        min-height: 44px;
    }

    .ds-geo-suggest__close {
        top: 14px;
        transform: none;
    }
}

@keyframes ds-geo-suggest-in {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ds-geo-suggest {
        animation: none;
    }
}
