/* Luxury Property Search Widget - Clean Black & White Design */

.keyspace-search-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 1.5rem
}

.keyspace-label-section {
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease
}

.keyspace-label-section.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none
}

.keyspace-label-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap
}

.keyspace-label-pill {
    cursor: pointer
}

.keyspace-label-pill input[type=radio] {
    display: none
}

.keyspace-label-pill span {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 0.875rem;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-weight: 500;
    text-align: center
}

.keyspace-label-pill input[type=radio]:checked+span {
    background: #000;
    color: #fff;
    border-color: #000;
    font-weight: 600
}

.keyspace-label-pill span:hover {
    border-color: #000;
    background: #f9f9f9
}


/* Redesigned status tabs: dark rounded pill navigation */
.keyspace-status-wrapper {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center
}

.keyspace-status-tabs {
    display: inline-flex;
    gap: 0;
    background: #1a1a1a;
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    align-items: center
	padding-bottom: 0;
}

.keyspace-status-tab {
    cursor: pointer;
    margin: 0;
	padding-bottom: 0;
}

.keyspace-status-tab input[type=radio] {
    display: none
}

.keyspace-status-tab span {
    display: block;
    padding: 0.625rem 1.5rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: 0 0;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    border: none;
    letter-spacing: 0.3px
}

.keyspace-status-tab input[type=radio]:checked+span {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-weight: 600
}

.keyspace-status-tab span:hover {
    color: #e0e0e0;
    background: 0 0
}

.keyspace-status-tab input[type=radio]:checked+span:hover {
    background: #fff;
    color: #000
}


.keyspace-search-form {
    position: relative
}

.keyspace-search-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    gap: 0
}

.keyspace-search-bar:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0
}

.keyspace-search-segment {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative
}

.keyspace-search-segment:hover {
    background: #d0d0d0
}

.keyspace-segment-input {
    width: 100%;
    border: none;
    background: 0 0;
    font-size: 0.9375rem;
    color: #000;
    padding: 0;
    outline: 0;
    cursor: pointer;
    border-bottom: none;
    transition: border-color 0.2s ease
}

.keyspace-segment-input::placeholder {
    color: #999
}

.keyspace-segment-input:focus {
    color: #000;
    cursor: text
}

.keyspace-search-divider {
    width: 1px;
    height: 28px;
    background: #e0e0e0;
    margin: 0 0.75rem;
    flex-shrink: 0
}

.keyspace-more-filters-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.3px
}

.keyspace-more-filters-btn:hover {
    background: #fafafa
}

.keyspace-search-button {
    padding: 0.75rem 2rem;
    background: #000;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    letter-spacing: 0.3px
}

.keyspace-search-button:hover {
    background: #1a1a1a;
    transform: none
}

.keyspace-search-button:active {
    transform: scale(0.99)
}

/* Mobile-only scroll lock when filters are active */
@media (max-width: 768px) {
    body.keyspace-filters-open {
        overflow: hidden !important
    }
}

.keyspace-advanced-filters {
    position: absolute;
    top: calc(100% + 1.5rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.keyspace-advanced-filters.show {
    max-height: 70vh;
    opacity: 1;
    visibility: visible
}

.keyspace-close-filters {
    display: none;
    position: absolute;
    top: 2.5rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999999999999999;
    transition: all 0.2s ease
}

.keyspace-close-filters:hover {
    background: #e8e8e8
}

.keyspace-close-filters svg {
    color: #000
}

.keyspace-advanced-filters-content {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden
}

.keyspace-advanced-filters-content::-webkit-scrollbar {
    width: 6px
}

.keyspace-advanced-filters-content::-webkit-scrollbar-track {
    background: #f5f5f5
}

.keyspace-advanced-filters-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px
}

.keyspace-advanced-filters-content::-webkit-scrollbar-thumb:hover {
    background: #999
}

.keyspace-filter-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid #f0f0f0
}

.keyspace-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0
}

.keyspace-filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: #000;
    margin: 0 0 1.5rem 0;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-size: 0.85rem
}

.keyspace-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem
}

.keyspace-type-card {
    cursor: pointer
}

.keyspace-type-card input[type=radio] {
    display: none
}

.keyspace-type-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    background: #fff;
    transition: all 0.2s ease;
    min-height: 110px
}

.keyspace-type-icon {
    color: #666;
    transition: color 0.2s ease
}

.keyspace-type-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #000;
    text-align: center
}

.keyspace-type-card input[type=radio]:checked+.keyspace-type-card-content {
    background: #000;
    border-color: #000
}

.keyspace-type-card input[type=radio]:checked+.keyspace-type-card-content .keyspace-type-icon {
    color: #fff
}

.keyspace-type-card input[type=radio]:checked+.keyspace-type-card-content .keyspace-type-name {
    color: #fff
}

.keyspace-type-card-content:hover {
    border-color: #999;
    background: #f9f9f9
}

.keyspace-bedrooms-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap
}

.keyspace-bedroom-pill {
    cursor: pointer
}

.keyspace-bedroom-pill input[type=radio] {
    display: none
}

.keyspace-bedroom-pill span {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 0.875rem;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-weight: 500;
    min-width: 60px;
    text-align: center
}

.keyspace-bedroom-pill input[type=radio]:checked+span {
    background: #000;
    color: #fff;
    border-color: #000;
    font-weight: 600
}

.keyspace-bedroom-pill span:hover {
    border-color: #000;
    background: #f9f9f9
}

.keyspace-bathrooms-pills {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap
}

.keyspace-bathroom-pill {
    cursor: pointer
}

.keyspace-bathroom-pill input[type=radio] {
    display: none
}

.keyspace-bathroom-pill span {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 0.875rem;
    color: #000;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    font-weight: 500;
    min-width: 60px;
    text-align: center
}

.keyspace-bathroom-pill input[type=radio]:checked+span {
    background: #000;
    color: #fff;
    border-color: #000;
    font-weight: 600
}

.keyspace-bathroom-pill span:hover {
    border-color: #000;
    background: #f9f9f9
}

.keyspace-price-slider-container {
    margin-bottom: 1.5rem
}

.keyspace-price-slider-track {
    position: relative;
    height: 50px;
    margin-bottom: 1rem
}

.keyspace-price-slider-range {
    position: absolute;
    height: 3px;
    background: #000;
    top: 24px;
    z-index: 2;
    pointer-events: none
}

.keyspace-range-slider {
    position: absolute;
    width: 100%;
    height: 3px;
    top: 24px;
    background: 0 0;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none
}

.keyspace-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 3
}

.keyspace-range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1)
}

.keyspace-range-slider::-webkit-slider-track {
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    border-radius: 0
}

.keyspace-range-slider::-moz-range-track {
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    border-radius: 0
}

.keyspace-price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.keyspace-price-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem
}

.keyspace-price-input-wrapper label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.3px
}

.keyspace-price-input {
    padding: 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    font-size: 0.875rem;
    transition: border-color 0.2s ease
}

.keyspace-price-input:focus {
    outline: 0;
    border-color: #000;
    box-shadow: none
}

/* Redesigned amenities section with circular checkboxes and 2-column grid */
.keyspace-amenities-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem
}

.keyspace-amenities-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem
}

.keyspace-amenity-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.625rem 0
}

.keyspace-amenity-checkbox input[type=checkbox] {
    display: none
}

.keyspace-amenity-checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #d0d0d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: #fff
}

.keyspace-amenity-checkmark::after {
    content: '';
    width: 5px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease
}

.keyspace-amenity-checkbox input[type=checkbox]:checked+.keyspace-amenity-checkmark {
    background: #000;
    border-color: #000
}

.keyspace-amenity-checkbox input[type=checkbox]:checked+.keyspace-amenity-checkmark::after {
    transform: rotate(45deg) scale(1)
}

.keyspace-amenity-label {
    font-size: 0.875rem;
    font-weight: 400;
    color: #000
}

.keyspace-amenity-hidden {
    display: none
}

.keyspace-show-more-amenities {
    background: 0 0;
    border: none;
    color: #0066cc;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.75rem 0;
    text-align: left;
    transition: color 0.2s ease;
    text-decoration: none;
    letter-spacing: 0.3px
}

.keyspace-show-more-amenities:hover {
    color: #0052a3
}

/* Removed the .keyspace-label-section styles as labels are now at the top, not in advanced filters */

.keyspace-filter-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 1.5rem
}

.keyspace-clear-btn {
    padding: 0.75rem 1.75rem;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px
}

.keyspace-clear-btn:hover {
    background: #000;
    color: #fff
}

.keyspace-autocomplete-results {
    position: absolute;
    top: calc(100% + 1.4rem);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    max-height: 320px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12)
}

.keyspace-autocomplete-results.active {
    display: block
}

.keyspace-autocomplete-results::-webkit-scrollbar {
    width: 6px
}

.keyspace-autocomplete-results::-webkit-scrollbar-track {
    background: #f5f5f5
}

.keyspace-autocomplete-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 0
}

.keyspace-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #999
}

.keyspace-autocomplete-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.15s ease
}

.keyspace-autocomplete-item.selected,
.keyspace-autocomplete-item:hover {
    background-color: #f9f9f9
}

.keyspace-autocomplete-item:last-child {
    border-bottom: none
}

.keyspace-autocomplete-title {
    font-weight: 600;
    color: #000;
    margin-bottom: 0.375rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem
}

.keyspace-autocomplete-type {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #000;
    color: #fff;
    font-size: 0.625rem;
    border-radius: 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em
}

.keyspace-autocomplete-meta {
    font-size: 0.75rem;
    color: #999;
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap
}

.keyspace-autocomplete-loading {
    padding: 1rem;
    text-align: center;
    color: #999;
    font-size: 0.8125rem
}

@media (max-width:768px) {
    .keyspace-search-container {
        padding: 1.5rem 1rem
    }

    .keyspace-label-wrapper {
        margin-bottom: 1.5rem
    }

    .keyspace-label-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.5rem;
        background: #ffffff99;
    }

    .keyspace-label-tab span {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .keyspace-search-bar {
        flex-direction: column;
        border-radius: 0;
        gap: 0;
        padding: 0.75rem;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06)
    }

    .keyspace-search-segment {
        width: 100%;
        padding: 0.75rem;
        background: #fafafa;
        border-radius: 0;
        margin-bottom: 0.5rem
    }

    .keyspace-segment-input {
        font-size: 1rem
    }

    .keyspace-search-divider {
        display: none
    }

    .keyspace-more-filters-btn,
    .keyspace-search-button {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        border-radius: 0;
        font-size: 0.8125rem
    }

    .keyspace-more-filters-btn {
        margin-bottom: 0.5rem;
        background: #fafafa
    }

    .keyspace-advanced-filters {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 10px 10px 0px 0px;
        max-height: 0;
        transform: translateY(100%);
        border: 1px solid #e0e0e0;
        border-bottom: none
    }

    .keyspace-advanced-filters.show {
        max-height: 80vh;
        transform: translateY(0)
    }

    .keyspace-close-filters {
        display: flex
    }

    .keyspace-advanced-filters-content {
        padding: 2.5rem 1rem 1rem;
        max-height: 80vh
    }

    .keyspace-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem
    }

    .keyspace-type-card-content {
        padding: 1rem 0.75rem;
        min-height: 90px
    }

    .keyspace-filter-title {
        font-size: 0.75rem;
        margin-bottom: 1rem
    }

    .keyspace-amenities-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem
    }

    .keyspace-amenity-checkbox {
        padding: 0.375rem 0;
        gap: 0.6rem
    }

    .keyspace-amenity-label {
        font-size: 0.8125rem
    }

    .keyspace-price-inputs {
        grid-template-columns: 1fr;
        gap: 0.75rem
    }

    .keyspace-autocomplete-results {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        border-radius: 0;
        max-height: 70vh;
        border: 1px solid #e0e0e0;
        border-bottom: none;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1)
    }

    .keyspace-filter-section {
        margin-bottom: 1.75rem;
        padding-bottom: 1.75rem
    }

    .keyspace-bedroom-pill span,
    .keyspace-bathroom-pill span {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem
    }

    .keyspace-price-input-wrapper label {
        font-size: 0.75rem
    }

    .keyspace-price-input {
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem
    }

    .keyspace-clear-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem
    }

    .keyspace-show-more-amenities {
        font-size: 0.8125rem
    }
}

@media (max-width:480px) {
    .keyspace-search-container {
        padding: 1rem 0.75rem
    }

    .keyspace-label-tab span {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem
    }

    .keyspace-search-bar {
        padding: 0.5rem
    }

    .keyspace-search-segment {
        padding: 0.625rem;
        margin-bottom: 0.375rem
    }

    .keyspace-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem
    }

    .keyspace-type-card-content {
        padding: 0.75rem 0.5rem;
        min-height: 80px
    }

    .keyspace-filter-title {
        font-size: 0.7rem;
        margin-bottom: 0.75rem
    }

    .keyspace-amenities-list {
        grid-template-columns: 1fr;
        gap: 0.5rem
    }

    .keyspace-amenity-checkmark {
        width: 18px;
        height: 18px
    }

    .keyspace-amenity-label {
        font-size: 0.75rem
    }

    .keyspace-more-filters-btn,
    .keyspace-search-button {
        padding: 0.625rem;
        font-size: 0.75rem
    }

    .keyspace-advanced-filters-content {
        padding: 2rem 0.75rem 0.75rem
    }

    .keyspace-filter-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem
    }
}

.keyspace-advanced-filters,
.keyspace-autocomplete-results {
    scroll-behavior: smooth
}

.keyspace-more-filters-btn:focus-visible,
.keyspace-search-button:focus-visible,
.keyspace-segment-input:focus-visible,
.keyspace-label-tab span:focus-visible {
    outline: 0px solid #000;
    outline-offset: 2px
}
