.find_a_stockist_google {
    position: relative;

    & .find_a_stockist_google_top {
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 40px;
        margin: 0 0 clamp(24px, 4vw, 40px);

        @media (max-width: 767px) {
            flex-direction: column;
            gap: 20px;
        }
    }

    & .find_a_stockist_google_header {
        max-width: 720px;
        flex: 1;
        margin: 0;

        & .find_a_stockist_google_title {
            margin: 0 0 16px;
            color: var(--headings);
            font-size: clamp(2.8rem, 4vw, 4rem);
            line-height: 1.15;
        }

        & .find_a_stockist_google_intro {
            color: var(--text);
            font-size: 1.7rem;
            line-height: 1.6;

            & p {
                margin: 0 0 12px;
            }

            & p:last-child {
                margin-bottom: 0;
            }
        }
    }

    & .find_a_stockist_google_empty {
        margin: 0;
        padding: 24px;
        background: var(--grey);
        border-radius: 8px;
        color: var(--text);
        font-size: 1.5rem;

        & code {
            background: var(--white);
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 1.3rem;
        }
    }

    & .find_a_stockist_google_layout {
        display: grid;
        grid-template-columns: minmax(300px, 380px) 1fr;
        gap: 24px;
        align-items: stretch;
        min-height: 640px;

        @media (max-width: 991px) {
            grid-template-columns: 1fr;
            min-height: 0;
        }
    }

    & .find_a_stockist_google_sidebar {
        display: flex;
        flex-direction: column;
        background: var(--white);
        border: 1px solid var(--grey);
        border-radius: 12px;
        overflow: hidden;
        max-height: 700px;

        @media (max-width: 991px) {
            max-height: none;
            order: 2;
        }
    }

    /* Postcode + radius "nearest stockist" search — the reason this section exists. */
    & .find_a_stockist_google_nearest {
        padding: 16px;
        background: var(--white);
        border-bottom: 1px solid var(--grey);

        & .find_a_stockist_google_nearest_label {
            display: block;
            margin: 0 0 8px;
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--headings);
        }

        & .find_a_stockist_google_nearest_controls {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        & .find_a_stockist_google_postcode_input {
            flex: 1 1 160px;
            min-width: 0;
            padding: 10px 14px;
            font-size: 1.4rem;
            color: var(--text);
            background: var(--grey);
            border: 1px solid transparent;
            border-radius: 500px;
            outline: none;
            transition: border-color 0.2s ease, background 0.2s ease;

            &::placeholder {
                color: var(--tertiary, #8890A7);
            }

            &:focus {
                border-color: var(--primary);
                background: var(--white);
            }
        }

        & .find_a_stockist_google_radius_select {
            padding: 10px 14px;
            font-size: 1.3rem;
            color: var(--text);
            background: var(--grey);
            border: 1px solid transparent;
            border-radius: 500px;
            outline: none;
            cursor: pointer;
        }

        & .find_a_stockist_google_geolocate {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            padding: 0;
            color: var(--primary);
            background: var(--grey);
            border: 1px solid transparent;
            border-radius: 500px;
            cursor: pointer;
            transition: background 0.2s ease, color 0.2s ease;

            &:hover,
            &:focus-visible {
                background: var(--primary);
                color: var(--white);
                outline: none;
            }

            &[hidden] {
                display: none;
            }
        }

        & .find_a_stockist_google_nearest_submit {
            padding: 10px 20px;
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--white);
            background: var(--primary);
            border: none;
            border-radius: 500px;
            cursor: pointer;
            white-space: nowrap;
            transition: background 0.2s ease;

            &:hover,
            &:focus-visible {
                background: var(--button-primary);
                outline: none;
            }
        }

        & .find_a_stockist_google_nearest_footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;

            &:not(:empty) {
                margin-top: 10px;
            }
        }

        & .find_a_stockist_google_nearest_status {
            margin: 0;
            font-size: 1.2rem;
            color: var(--text);

            &[hidden] {
                display: none;
            }
        }

        & .find_a_stockist_google_nearest_share,
        & .find_a_stockist_google_nearest_clear {
            padding: 0;
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary);
            background: none;
            border: none;
            cursor: pointer;
            text-decoration: underline;

            &[hidden] {
                display: none;
            }

            &:hover,
            &:focus-visible {
                color: var(--button-primary);
                outline: none;
            }

            &:disabled {
                cursor: default;
                text-decoration: none;
                color: var(--text);
            }
        }
    }

    & .find_a_stockist_google_nearest_results {
        list-style: none;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        flex: 1;

        &[hidden] {
            display: none;
        }

        & .find_a_stockist_google_distributor {
            border-top: 1px solid var(--grey);

            &:first-child {
                border-top: none;
            }
        }
    }

    & .find_a_stockist_google_no_results {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1 1 480px;
        max-width: 640px;
        margin: 0;
        padding: 24px 32px;
        text-align: center;
        color: var(--text);
        font-size: 1.4rem;
        line-height: 1.5;
        background: var(--grey);
        border-radius: 8px;

        &[hidden] {
            display: none;
        }

        & a {
            font-size: inherit;
            font-weight: inherit;
            color: var(--primary);
        }
    }

    & .find_a_stockist_google_states {
        list-style: none;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        flex: 1;

        & .find_a_stockist_google_state {
            border-bottom: 1px solid var(--grey);

            &:last-child {
                border-bottom: none;
            }

            &.is_hidden {
                display: none;
            }
        }
    }

    & .find_a_stockist_google_state_toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 20px;
        background: transparent;
        border: none;
        text-align: left;
        cursor: pointer;
        font-size: 1.5rem;
        font-weight: 600;
        color: var(--headings);
        transition: background 0.15s ease;

        &:hover,
        &:focus-visible {
            background: var(--grey);
            outline: none;
        }

        &[aria-expanded="true"] {
            background: var(--grey);

            & .find_a_stockist_google_state_name::before {
                transform: rotate(90deg);
            }
        }

        & .find_a_stockist_google_state_name {
            display: inline-flex;
            align-items: center;
            gap: 8px;

            &::before {
                content: "";
                display: inline-block;
                width: 0;
                height: 0;
                border-top: 5px solid transparent;
                border-bottom: 5px solid transparent;
                border-left: 6px solid currentColor;
                transition: transform 0.2s ease;
            }
        }

        & .find_a_stockist_google_state_count {
            font-size: 1.3rem;
            color: var(--text);
            background: var(--white);
            padding: 2px 10px;
            border-radius: 500px;
            font-weight: 600;
        }
    }

    & .find_a_stockist_google_distributors {
        list-style: none;
        margin: 0;
        padding: 0;

        &[hidden] {
            display: none;
        }

        & .find_a_stockist_google_distributor {
            border-top: 1px solid var(--grey);

            &.is_hidden {
                display: none;
            }
        }
    }

    /* Shared by both distributor lists — the state-grouped browse list
       (.find_a_stockist_google_distributors) and the postcode-search results
       (.find_a_stockist_google_nearest_results). Scoped at the section level,
       not nested inside either list's container, since a row created by JS
       for search results needs the exact same look as a PHP-rendered browse
       row and previously didn't get it (this rule lived only inside the
       browse list's container, so JS-built rows rendered unstyled). */
    & .find_a_stockist_google_distributor_btn {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 12px 20px 12px 36px;
        background: transparent;
        border: none;
        text-align: left;
        cursor: pointer;
        transition: background 0.15s ease;

        &:hover,
        &:focus-visible {
            background: var(--grey);
            outline: none;
        }

        &.is_active {
            background: var(--background);
            box-shadow: inset 4px 0 0 var(--primary);
        }

        & .find_a_stockist_google_distributor_head {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 8px;
        }

        & .find_a_stockist_google_distributor_name {
            font-size: 1.4rem;
            font-weight: 600;
            color: var(--headings);
            line-height: 1.3;
        }

        & .find_a_stockist_google_distributor_distance {
            flex-shrink: 0;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--primary);
        }

        & .find_a_stockist_google_distributor_line {
            font-size: 1.2rem;
            color: var(--text);
            line-height: 1.4;
        }
    }

    /* Sibling of .find_a_stockist_google_distributor_btn, not nested inside
       it — an <a> inside a <button> is invalid HTML and breaks click
       handling, so this sits alongside the button within the same <li>. */
    & .find_a_stockist_google_distributor_directions {
        display: inline-block;
        margin: 0 0 10px 36px;
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--primary);
        text-decoration: underline;

        &:hover,
        &:focus-visible {
            color: var(--button-primary);
            outline: none;
        }
    }

    & .find_a_stockist_google_map_wrapper {
        position: relative;
        border-radius: 12px;
        overflow: hidden;
        background: var(--grey);
        min-height: 640px;

        @media (max-width: 991px) {
            order: 1;
            min-height: 420px;
            height: 60vh;
            max-height: 560px;
        }
    }

    & .find_a_stockist_google_map {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    /* Google InfoWindow content — the chrome (arrow, close button, padding)
       is Google's own and not overridable without deep :is()/shadow-DOM
       hacking; only the content we inject is styleable. */
    & .find_a_stockist_google_popup_name {
        display: block;
        margin: 0 0 4px;
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--headings);
    }

    & .find_a_stockist_google_popup_line {
        display: block;
        font-size: 1.2rem;
        color: var(--text);
    }
}

/* Google Places Autocomplete dropdown — appended by Google directly to
   <body>, not inside .find_a_stockist_google, so it can't be scoped under
   that selector. Only rendered at all when a section turns the "Suggest
   Addresses As You Type" ACF toggle on. */
.pac-container {
    /* Google sets an inline width matching the input it's attached to —
       our postcode input is a narrow sidebar field, which truncated longer
       suggestion text to near-illegible fragments. Forcing a wider minimum
       here overrides that inline style. */
    width: auto !important;
    min-width: 320px !important;
    max-width: 90vw;
    font-family: inherit;
    border: 1px solid var(--grey);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

    &:after {
        display: none;
    }

    & .pac-item {
        padding: 8px 14px;
        font-size: 1.3rem;
        color: var(--text);
        border-top-color: var(--grey);
    }

    & .pac-item-query {
        font-size: 1.3rem;
        color: var(--headings);
    }

    & .pac-icon {
        display: none;
    }
}
