/* Final desktop-only compact density adjustment for the homepage search. */
@media (min-width: 1200px) {
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-home-market-selector > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--features > .artbin-service-control,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--features > .artbin-service-control > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--types > .artbin-service-control,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--types > .artbin-service-control > summary {
        height: 48px !important;
        min-height: 48px !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-home-market-selector > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--features > .artbin-service-control > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--types > .artbin-service-control > summary {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .artbin-service-native-search.houzez-ele-search-form-wrapper,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .houzez-ele-search-form-wrapper,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .elementor-field-group-4b30271,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .elementor-field-type-submit,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot input[name="keyword"],
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .elementor-field-type-submit .houzez-search-button {
        height: 48px !important;
        min-height: 48px !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .artbin-service-native-search.houzez-ele-search-form-wrapper,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-search-slot .houzez-ele-search-form-wrapper {
        grid-template-rows: 48px !important;
    }
}

/* Desktop and tablet popovers keep City, Features and Types equally scannable. */
@media (min-width: 768px) {
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="city"] > .artbin-service-control-popover,
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="features"] > .artbin-service-control-popover,
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="types"] > .artbin-service-control-popover {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: max(100%, 310px) !important;
        min-width: 0 !important;
        max-width: min(520px, calc(100vw - 48px)) !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="city"] > .artbin-service-control-popover > .artbin-service-city,
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="features"] > .artbin-service-control-popover > .artbin-service-feature,
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="types"] > .artbin-service-control-popover > .artbin-service-type {
        width: 100% !important;
        min-width: 0 !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="city"] > .artbin-service-control-popover > .artbin-service-city-more {
        grid-column: 1 / -1 !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="features"] > .artbin-service-control-popover > .artbin-service-features,
    html body.artbin-home-gold-search-active .artbin-service-filter--home [data-artbin-control="types"] > .artbin-service-control-popover > .artbin-service-types {
        display: grid !important;
        grid-column: 1 / -1 !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Desktop and tablet: keep the compact second rail in the approved order.
   City → Types → Features → Address / Property ID → Search. */
@media (min-width: 1200px) {
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--types {
        grid-column: 2 !important;
        grid-row: 2 !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--features {
        grid-column: 3 !important;
        grid-row: 2 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--types {
        grid-column: 1 / 7 !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-filter-group--features {
        grid-column: 7 / -1 !important;
    }
}

/* A selected desktop/tablet control stays legible on its navy surface. */
@media (min-width: 768px) {
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control.is-active > summary,
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control[open] > summary {
        color: #ffffff !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control.is-active > summary [data-artbin-selection-label],
    html body.artbin-home-gold-search-active .artbin-service-filter--home .artbin-service-compact-controls > .artbin-service-control[open] > summary [data-artbin-selection-label] {
        color: #ffffff !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home > .artbin-service-selection-summary > .artbin-service-selection-summary-label {
        color: #ffffff !important;
    }

    html body.artbin-home-gold-search-active .artbin-service-filter--home > .artbin-service-selection-summary .artbin-service-selection-chip {
        border-color: rgba(244, 181, 27, .92) !important;
        background: rgba(244, 181, 27, .10) !important;
    }
}
