﻿/* Note to MBS: Please improve...

    Used on:
        /property_list/properties.aspx
        /property_list/search.aspx

*/

/* Temporary SW classes to make the page readable */
.inline_block_sw {
    display: inline-block;
}

hr.mini-divider {
    margin-left: auto;
    margin-right: auto;
    height: 20px;
    color: black;
    width: 50%;
}

/*-----------------------------------------------------*/
/* Search.aspx — MBS-specific layout and styling */

/* No decorative lines under filter title (.section-heading h2 uses ::before/::after in amsrentals-styles.css) */
.search-mbs-filter-heading.section-heading h2::before,
.search-mbs-filter-heading.section-heading h2::after {
    display: none !important;
    content: none !important;
}

/* Search results summary lines (<p class="text-muted">) — bold, centred */
.search-mbs-results-section p.text-muted {
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
}


/* Filter panel — match search result cards (.search-result-card) */
.search-mbs-filter-panel {
    background: #fff;
    border: 1px solid #d9e2f1;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-top: -0.75rem; /* Reduce heading-to-fields gap by ~25% */
}

/* All filter groups on one row; wraps on narrow viewports */
.search-mbs-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 1.5rem;
    row-gap: 0.75rem;
}

    .search-mbs-filters-row .search-mbs-filter-cell {
        flex: 0 1 auto;
    }

    .search-mbs-filters-row .search-mbs-labeled-block {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
    }

    .search-mbs-filters-row .search-mbs-field-label {
        display: block;
    }

    /* Align date/Sleeps row controls + labels + checkboxes on one baseline row */
    .search-mbs-filters-row .inline_block_sw {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;
        column-gap: 0.5rem;
        row-gap: 0.25rem;
    }

        .search-mbs-filters-row .inline_block_sw label {
            margin: 0;
            line-height: 1.25;
        }

    .search-mbs-filters-row input[type="checkbox"] {
        margin: 0;
        flex-shrink: 0;
        transform: translateY(2px);
    }

/* Space above Search / Clear Filters */
.search-mbs-filter-actions {
    padding-top: 1.25rem;
    margin-bottom: 0.75rem !important; /* Half of Bootstrap mb-4 (1.5rem) */
}

/* Large screens: place Search/Clear at end of filter row */
@media (min-width: 992px) {
    .search-mbs-filter-panel .search-mbs-filters-row {
        flex-wrap: nowrap;
        column-gap: 1rem;
    }

    .search-mbs-filters-row .search-mbs-filter-cell {
        min-width: 0;
    }

    .search-mbs-filters-row .inline_block_sw {
        flex-wrap: nowrap;
    }

    .search-mbs-filters-row .search-mbs-filter-cell:nth-child(1) select {
        width: 9rem;
    }

    .search-mbs-filters-row .search-mbs-filter-cell:nth-child(2) .date_field {
        width: 9.5rem;
    }

    .search-mbs-filters-row .search-mbs-filter-cell:nth-child(3) select {
        width: 7rem;
    }

    .search-mbs-filters-row .search-mbs-filter-cell:nth-child(4) select {
        width: 8rem;
    }

    .search-mbs-filter-actions {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
}

    /* Match AMS Rentals blue; Search button taller and narrower than filter fields */
    .search-mbs-filter-actions .btn-info {
        height: calc(2.75rem * 0.85 * 0.8);
        min-height: calc(2.75rem * 0.85 * 0.8);
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
        line-height: 1.5;
        background-color: #338ff7;
        border-color: #338ff7;
        color: #fff;
    }

/* Keep Clear button same height as Search */
.search-mbs-filter-actions .btn-outline-secondary {
    height: calc(2.75rem * 0.85 * 0.8);
    min-height: calc(2.75rem * 0.85 * 0.8);
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

        .search-mbs-filter-actions .btn-info:hover,
        .search-mbs-filter-actions .btn-info:focus,
        .search-mbs-filter-actions .btn-info:active,
        .search-mbs-filter-actions .btn-info:not(:disabled):not(.disabled).active {
            background-color: #1f72cf;
            border-color: #1f72cf;
            color: #fff;
        }

            .search-mbs-filter-actions .btn-info:focus,
            .search-mbs-filter-actions .btn-info:active:focus {
                box-shadow: 0 0 0 0.2rem rgba(51, 143, 247, 0.35);
            }

/* Same visual height for selects and date field; thin 1px border (BS4+BS5 mix can look heavier on some controls) */
.search-mbs-filters-row .date_field,
.search-mbs-filters-row select {
    box-sizing: border-box;
    height: calc(2.75rem * 0.85);
    min-height: calc(2.75rem * 0.85);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    vertical-align: middle;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    background-color: #fff;
    box-shadow: none;
}

    .search-mbs-filters-row .date_field:focus,
    .search-mbs-filters-row select:focus {
        border-color: #80bdff;
        outline: 0;
        box-shadow: none;
    }
