/* Layout fixes introduced during staging cleanup. */

/* Allow children of the property/sidebar grid to shrink to their assigned tracks.
   Without this, long content can force the main property column and sidebar wider
   than the intended 2fr / 1fr layout. */
.wrap.with-sidebar > * {
    min-width: 0;
}

/* Prevent long advisor contact details from forcing the sidebar grid wider. */
#advisors .contact-details,
#advisors .contact-details a {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Keep team cards from expanding their grid columns when staging rewrites email domains. */
#team-members > *,
#team-members aside,
#team-members .email-address {
    min-width: 0;
}

#team-members .email-address {
    overflow-wrap: anywhere;
}

/* Preserve the existing desktop pricing appearance with semantic price groups. */
.property header .price .property-price-item,
.property header .price .property-price-value {
    font-weight: bold;
    opacity: 1;
}

/* Keep faces in frame when the team grid becomes wider at smaller breakpoints. */
@media screen and (max-width: 768px) {
    #team-members a.profile-img img {
        object-position: center top;
    }

    /* Give the location and each transaction price the full available width. */
    .property header {
        grid-template-columns: minmax(0, 1fr);
    }
    .property header .price {
        clip-path: none;
        text-align: left;
        min-width: 0;
        display: grid;
        gap: 8px;
        letter-spacing: 0.3px;
        line-height: 20px;
    }
    .property header .price .property-price-item {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 8px;
        min-width: 0;
    }
    .property header .price .property-price-label {
        white-space: nowrap;
    }
    .property header .price .property-price-value {
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .property header .price .property-price-separator {
        display: none;
    }
}

/* Let property summary items wrap together rather than squeezing three columns. */
@media screen and (max-width: 768px) {
    .property footer {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px 20px;
        padding: 12px 17px;
    }
    .property footer aside {
        padding: 0;
        max-width: 100%;
        min-width: 0;
        line-height: 20px;
        letter-spacing: 0.3px;
        overflow-wrap: anywhere;
    }
}
