/* 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;
}

/* The homepage video hero pulls itself up behind the transparent header
   (margin-top: -100px in awd.css) and would cover the in-flow bar. When the
   bar is actually rendered, let the hero start below it instead. Desktop only:
   on mobile the suggestion is a fixed bottom sheet and the slot stays empty-height. */
@media (min-width: 768px) {
    #mm-geo-suggest-slot:has(.ds-geo-suggest) + #common-home .ds-video-hero {
        margin-top: 0;
        padding-top: 0;
    }
}

@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;
    }
}
