/*
 * BestPropertyPlug — Agency Public Profile Desktop Layout Authority V3.1
 *
 * Approved desktop structure:
 *   LEFT  = all Agency content from About through Similar Agencies
 *   RIGHT = Contact Agency / Profile Trust widget
 *
 * The right widget remains sticky while the user scrolls down the long
 * left content column. Mobile/tablet, header and footer are untouched.
 */

@media (min-width: 1101px) {
    body#page-agency-profile .rpg-storefront .rpg-storefront__layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(286px, 320px) !important;
        grid-template-rows: auto !important;
        column-gap: 24px !important;
        row-gap: 0 !important;
        align-items: start !important;
        width: 100% !important;
        max-width: var(--container-max-width, 1320px) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        position: relative !important;
        overflow: visible !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__layout > .rpg-storefront__main {
        display: block !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        float: none !important;
        overflow: visible !important;
        z-index: 1 !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__main > * {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__layout > .rpg-storefront__sidebar {
        display: block !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 !important;
        padding: 0 !important;
        justify-self: end !important;
        align-self: start !important;
        position: sticky !important;
        top: calc(var(--bpp-udh-v101-total-h, 118px) + 16px) !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        inset-inline: auto !important;
        transform: none !important;
        translate: none !important;
        float: none !important;
        z-index: 20 !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__sidebar > * {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__sidebar .rpg-storefront__contact-card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        translate: none !important;
        float: none !important;
    }

    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-storefront__section,
    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-storefront__inventory,
    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-storefront__featured-grid,
    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-storefront__property-grid,
    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-storefront__similar-grid,
    body#page-agency-profile .rpg-storefront .rpg-storefront__main .rpg-profile__trust {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
