/* ========================================
   FILTER CONTAINER
   ======================================== */

.filter-container {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: space-around;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border-radius: var(--radius-l);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ========================================
   FILTER DROPDOWNS
   ======================================== */

.cities,
.types,
.bedrooms,
.area-filter,
.price-filter {
    position: relative;
    min-width: 180px;
}

.filter-select__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-select__header-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-box {
    width: 100%;
    padding: 10px 30px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.search-box::placeholder {
    color: #999;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--base);
    cursor: pointer;
    display: flex;
    transition: background 0.2s;
    justify-content: center;
    align-items: center;
    padding-bottom: 0.3rem;
}

.clear-btn:hover {
    background: var(--primary);
    color: var(--secondary);
}

/* ========================================
   OPTIONS DROPDOWN
   ======================================== */

.options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 300px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    margin-top: 4px;
    padding: 0;
    list-style: none;
}

.cities.active .options,
.types.active .options,
.bedrooms.active .options,
.area-filter.active .options,
.price-filter.active .options {
    display: block;
}

.options li {
    padding: 10px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f0f0f0;
}

.options li:last-child {
    border-bottom: none;
}

.options li:hover {
    background: #f5f5f5;
}

.options li.selected {
    background: #e8f4fa;
    color: #0073aa;
    font-weight: 500;
}

/* ========================================
   DISABLED STATE
   ======================================== */

.bedrooms.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.bedrooms.disabled .search-box {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* ========================================
   RESULTS COUNT
   ======================================== */

.filter-results-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 16px 0;
    font-size: 14px;
    color: #666;
}

.filter-results-count .count-number {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* ========================================
   SORT BAR
   ======================================== */

.property-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.property-sort-bar .sort-bar-left {
    display: flex;
    align-items: start;
    gap: 12px;
}

.property-sort-bar .sort-label {
    font-size: 14px;
    font-weight: 700;
}

.property-sort-bar .sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.property-sort-bar .sort-option {
    padding: 8px 16px;
    border: 1px solid var(--base);
    background-color: var(--secondary);
    border-radius: var(--radius-l);
    font-size: var(--text-m);
    cursor: pointer;
    transition: all 0.2s ease;
}

.property-sort-bar .sort-option:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.property-sort-bar .sort-option.active {
    background: var(--base);
    border-color: var(--seconday);
    font-weight: 600;
    color: var(--secondary);
}


/* ========================================
   RESPONSIVE
   ======================================== */

/* Base = Desktop (> 991px) */

/* Tablet portrait */
@media (max-width: 991px) {
    
    .filter-container {
        flex-direction: column;
    }

    .regions,
    .types,
    .bedrooms,
    .area-filter,
    .price-filter {
        min-width: 100%;
    }
}