/*
 * BestPropertyPlug Ghana — Homepage Mobile Search Center V26.1
 * Scope: homepage search panel on mobile only (<=760px)
 * Fix: center the complete Buy / Rent / Projects search shell.
 * Does NOT redesign the search form or alter header/footer/desktop/tablet.
 */

@media (max-width: 760px) {
    /*
     * The homepage's older mobile rules set the generic .rpgx-container to
     * calc(100% - 20px). Combined with inherited container padding this can
     * make the search panel wider than its visual viewport and appear shifted
     * to the left. Reset only the container directly inside the search wrapper.
     */
    html body .rpgx-home .rpgx-search-wrap > .rpgx-container {
        display: block !important;
        width: calc(100% - 28px) !important;
        max-width: 720px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
    }

    html body .rpgx-home .rpgx-search-wrap {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    html body .rpgx-home .rpgx-search-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
        transform: none !important;
    }

    html body .rpgx-home .rpgx-search-tabs,
    html body .rpgx-home .rpgx-search-box,
    html body .rpgx-home .rpgx-more-filters {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /* Keep every internal field inside the centered white search panel. */
    html body .rpgx-home .rpgx-search-box > *,
    html body .rpgx-home .rpgx-field,
    html body .rpgx-home .rpgx-search-btn {
        box-sizing: border-box !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

@media (max-width: 390px) {
    html body .rpgx-home .rpgx-search-wrap > .rpgx-container {
        width: calc(100% - 20px) !important;
    }
}
