﻿.property-search-box {
    padding-inline: 11px;
}

.property-search {
    width: 100%;
    display: flex;
    gap: 0;
    background: #fff;
    align-items: stretch;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    flex-wrap: wrap;
}

.selectBox {
    direction: ltr;
    width: 100%;
    position: relative;
    border-left: 1px solid #ddd;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    flex: 1;
}

    .selectBox:last-of-type {
        border-left: none;
    }

.selectHeader {
    display: flex;
    width: 100%;
    padding: 20px;
    align-items: center;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-drag: none;
}

.selectHeaderContent {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.selectHeader .top {
    font-size: 11px;
    color: #666;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: left;
}

.selectHeader .bottom {
    font-size: 16px;
    font-weight: normal;
    color: #d4a545;
    text-align: left;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

.selectBox.active .dropdown-arrow {
    transform: rotate(180deg);
}

.selectList {
    direction: ltr;
    width: 150%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 0 20px;
    z-index: 100;
    transition: all 0.3s ease !important;
    overflow: hidden;
}

.selectBox.active .selectList {
    padding: 20px;
    z-index: 101 !important;
}

.selectGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.selectItem {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    user-select: none;
}

    .selectItem input[type="checkbox"] {
        display: none;
    }

    .selectItem::before {
        content: '';
        width: 18px;
        height: 18px;
        border: 1px solid #ddd;
        border-radius: 3px;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        transition: all 0.2s;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .selectItem.checked::before {
        content: '✓';
        background: #d4a545;
        border-color: #d4a545;
        color: white;
    }

    .selectItem.checked {
        color: #d4a545;
        font-weight: 500;
    }

.clear-selection {
    text-align: left;
    font-size: 11px;
    color: #002F49;
    font-weight: bold;
    cursor: pointer;
    padding-top: 15px;
    border-top: 1px solid #eee;
    letter-spacing: 1px;
    user-select: none;
}

    .clear-selection:hover {
        color: #d4a545;
    }

.search-btn {
    width: 100%;
    min-width: 250px;
    padding: 20px 40px;
    background: #999;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 1px;
    transition: background 0.3s;
    flex: 0 0 160px;
}

    .search-btn:hover {
        background: #777;
    }

.selectRange {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.range-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .range-row span {
        color: #555;
        font-size: 15px;
    }

.range-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    flex: 1;
}

    .range-group select {
        flex: 1;
        padding: 1px 6px 6px 6px;
        border: 1px solid #ddd;
        border-radius: 4px;
        appearance: none;
        background: #fff;
    }

/* RTL adjustments if needed */
.ar .selectBox {
    direction: rtl;
}

.ar .selectHeader .top {
    text-align: right;
}

.ar .selectHeader .bottom {
    text-align: right;
}

.ar .clear-selection {
    text-align: right;
}

.ar .selectList {
    direction: rtl;
}

@media (max-width: 1100px) {
    .selectBox {
        border-left: none;
        border-bottom: 1px solid #ddd;
    }

        .selectBox:last-of-type {
            border-left: none;
        }

    .ar .property-search {
        flex-direction: column !important;
    }

    .property-search {
        flex-direction: column-reverse;
    }

    .search-btn {
        width: 100%;
        max-height: 70px;
    }

    .selectList {
        width: 100%;
    }
}
