#property-search-app {
    color: #203864;
}

#property-search-app *,
#property-search-app *::before,
#property-search-app *::after {
    box-sizing: border-box;
}

body.com_site_property.view-search #sp-left {
    display: none;
}

body.com_site_property.view-search #sp-component {
    flex: 0 0 100%;
    max-width: 100%;
}

.property-search {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0 48px;
}

.property-search h1 {
    margin: 0 0 32px;
    color: #203864;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.property-search--initial {
    padding-top: 28px;
}

.property-search--initial .search-form {
    max-width: 1720px;
    margin: 0 auto;
}

.search-field {
    min-width: 0;
}

.search-field-label {
    display: block;
    margin-bottom: 6px;
    color: #4b4f58;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.5;
}

.search-form .form-control,
.search-page-size select,
.search-sort select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 2px;
    background: #fff;
    color: #203864;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.search-form .form-control:focus,
.search-page-size select:focus,
.search-sort select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgb(0 123 255 / 25%);
}

.search-form .form-control::placeholder {
    color: #6c757d;
    opacity: 1;
    text-overflow: ellipsis;
}

.search-form .form-control[type="search"] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-keyword-control {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.search-type-select,
.search-range-select {
    width: 100%;
}

.search-type-select .ant-select-selector,
.search-range-select .ant-select-selector {
    height: 38px !important;
    padding: 3px 11px !important;
    border-color: #ced4da !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.search-type-select .ant-select-selection-item,
.search-type-select .ant-select-selection-placeholder,
.search-range-select .ant-select-selection-item,
.search-range-select .ant-select-selection-placeholder {
    line-height: 30px !important;
}

.search-type-select.ant-select-focused .ant-select-selector,
.search-range-select.ant-select-focused .ant-select-selector {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgb(0 123 255 / 25%) !important;
}

.search-filter-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.search-filter-fieldset:disabled {
    opacity: .55;
}

.search-range-select.ant-select-disabled .ant-select-selector {
    background: #e9ecef !important;
}

.search-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 48px;
    margin-top: 28px;
}

.search-form-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.search-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    min-height: 20px;
}

.search-radio,
.search-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 20px;
    color: #4b4f58;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}

.search-radio input,
.search-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #203864;
    cursor: pointer;
}

.search-location-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 12px 48px;
}

.search-other-locations {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(0px, 408px);
    align-items: center;
    gap: 12px 20px;
    margin-top: 20px;
}

.search-other-locations .ant-select {
    width: 100%;
    font-size: 14px;
}

.search-other-locations .ant-select-selector {
    min-height: 38px !important;
    border-color: #ced4da !important;
    border-radius: 2px !important;
    padding: 3px 11px !important;
    box-shadow: none !important;
}

.search-other-locations .ant-select-focused .ant-select-selector {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgb(0 123 255 / 25%) !important;
}

.search-other-locations .ant-select-selection-placeholder {
    color: #6c757d;
    line-height: 28px !important;
}

.search-other-locations .ant-select-selection-item {
    max-width: 160px;
}

.search-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 8px;
}

.search-range > span {
    color: #6c757d;
    font-size: 14px;
}

.search-property-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 12px 48px;
}

.search-form-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.search-form-actions .ant-btn {
    min-width: 112px;
    height: 38px;
    padding: 6px 15px;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.5;
}

.search-form-actions .search-clear-button {
    color: #203864;
}

.search-form-error {
    margin-top: 16px;
    padding: 8px 12px;
    border: 1px solid #f1aeb5;
    border-radius: 2px;
    background: #fff4f5;
    color: #b42338;
    font-size: 14px;
}

.property-search--results {
    width: min(100%, 1760px);
    padding-top: 28px;
}

.property-search-results-layout {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    align-items: start;
    gap: 40px;
}

.property-search-sidebar {
    /* Deliberately NOT sticky: the sidebar is taller than the viewport, so
       pinning it put its own Search button permanently out of reach (LC2AR-505). */
    padding: 24px;
    border: 1px solid #e7ebf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 25px 50px rgb(32 56 100 / 8%);
}

.property-search-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.property-search-sidebar-heading h2 {
    margin: 0;
    color: #203864;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.property-search-sidebar-heading button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #666;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.property-search-sidebar-heading button:hover {
    color: #203864;
    text-decoration: underline;
}

.search-form--compact .search-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.search-form--compact .search-keyword-control {
    grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
}

.search-form--compact .search-form-column {
    gap: 20px;
}

.search-form--compact .search-location-grid {
    gap: 10px 20px;
}

.search-form--compact .search-other-locations {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 16px;
}

.search-form--compact .search-property-types {
    grid-template-columns: 1fr;
    gap: 10px;
}

.search-form--compact .search-radio-group {
    gap: 8px 12px;
}

.search-form--compact .search-form-actions {
    justify-content: stretch;
    gap: 8px;
    margin-top: 24px;
}

.search-form--compact .search-form-actions .ant-btn {
    flex: 1 1 0;
    min-width: 0;
}

.property-search-results {
    min-width: 0;
}

.search-results-toolbar {
    min-height: 40px;
    margin-bottom: 16px;
}

.search-results-toolbar--bottom {
    justify-content: flex-end;
    margin-top: 20px;
    margin-bottom: 0;
}

.search-results-count {
    font-size: 17px;
}

.search-results-controls {
    min-width: 0;
}

.search-results-controls .ant-pagination {
    margin: 0;
}

.search-page-size select {
    width: 72px;
}

.search-sort select {
    width: 160px;
}

.search-listings {
    gap: 20px;
}

.property-search-results .property-lists .property-item {
    margin: 0;
}

.property-search-results .property-content-col .list_item_remark {
    margin-top: 8px;
}

.property-search-results .property-price {
    margin-bottom: 16px;
}

.search-loading,
.search-empty-state {
    display: grid;
    min-height: 320px;
    place-items: center;
    border: 1px solid #e7ebf2;
    border-radius: 16px;
    background: #fff;
    color: #666;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .property-search-results-layout {
        grid-template-columns: 1fr;
    }

    .property-search-sidebar {
        position: static;
    }

    .search-form--compact .search-form-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 32px;
    }

    .search-form--compact .search-property-types {
        grid-template-columns: repeat(2, minmax(0, max-content));
    }
}

@media (max-width: 760px) {
    .property-search {
        padding: 20px 0 32px;
    }

    .property-search h1 {
        font-size: 28px;
    }

    .search-form-grid,
    .search-form--compact .search-form-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 24px;
    }

    .search-keyword-control,
    .search-form--compact .search-keyword-control {
        grid-template-columns: 1fr;
    }

    .search-location-grid,
    .search-property-types,
    .search-form--compact .search-property-types {
        gap: 12px 24px;
    }

    .search-other-locations {
        grid-template-columns: 1fr;
    }

    .property-search-sidebar {
        padding: 20px 16px 24px;
    }

    .properties-pagination-bar,
    .properties-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .properties-pagination {
        width: 100%;
    }

    .search-sort select {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .search-location-grid,
    .search-property-types,
    .search-form--compact .search-property-types {
        grid-template-columns: 1fr;
    }

    .search-range {
        grid-template-columns: 1fr;
    }

    .search-range > span {
        display: none;
    }
}
