/* test */

.property-search-form {
    max-width: 100%;
    margin: 0;
    padding: 0rem;
    background: #fff;
    border-radius: 0px;
    box-shadow: none;
}

.search-form {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-right: 1px solid #eee;
    padding: 0 10px;
}

.form-group:last-child {
    border: 0;
}

/* Set specific widths for each form group */
.form-group:first-child {
    flex: 2; /* Location field takes up more space */
}

.form-group:nth-child(2) {
    flex: 1; /* Price range takes up less space */
    border-right: 0;
}

.search-button {
    flex: 0 0 auto; /* Button takes only the space it needs */
    white-space: nowrap;
    margin-bottom: 0.5rem; /* Align with inputs */
}

.form-group label {
    font-weight: 400;
    font-size: 14px;
    color: #333;
}

.property-search-form .search-form .form-group .form-control {
    transition: border-color 0.2s;
    width: 100%;
    font-size: 21px;
    padding: 0;
    border: 0;
    color: #000;
}

.form-control::placeholder {
    color: #000;
}

.form-control:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.elementor-kit-10 .filter-section input[type="text"].form-control,
.elementor-kit-10 .filter-section select.filter-select {
    padding: 6px 0 !important;
    font-size: 18px;
    border: none;
    border-bottom: none;
    border-radius: 0;
    border-width: 0 0 1px 0;
    background-color: white;
}

.property-search-form .search-form .form-group select.form-control {
    padding: 7px 7px 8px 0px;
}

/* Autocomplete Styles */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0.25rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

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

.autocomplete-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.autocomplete-item:hover {
    background-color: #f5f5f5;
}

.autocomplete-item.selected {
    background-color: #e3f2fd;
}

/* Search Button */
.property-search-form .search-form .search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 22px 20px;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 0;
    width: 145px;
}

.search-button:hover {
    background: #1976D2;
}

.search-button i {
    font-size: 1rem;
}

/* Mini Search Form */

.property-search-form.mini {
    padding: 10px 15px;
}

.property-search-form.mini .search-form .form-group .form-control {
    font-size: 21px;
    line-height: 3.4em;
}

.property-search-form.mini .search-form .form-group {
    border: none;
}


.property-search-form.mini .search-form .form-group .form-control::placeholder {
    font-size: 1rem;
}

/* Essential Filters */
.essential-filters {
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#property-search-form {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: stretch;
}

.filter-section {
    flex: 1;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-right: 1px solid #eee; /* Vertical divider */
    padding-right: 2rem; /* Add padding for the divider */
    min-height: 90px; /* Set a minimum height for all sections */
    justify-content: flex-start; /* Align content to the top */
}

.filter-section:last-of-type,
.filter-actions {
    border-right: none; /* Remove vertical divider for the last section and filter actions */
}

.filter-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make filter group take full height of section */
}

.filter-group:last-of-type {
    flex-grow: 1; /* Make the last filter group expand to fill available space */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.filter-input,
.filter-select {
    width: 100%;
    height: 45px;
    padding: 8px 12px;
    border: none;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    transition: background-color 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    background: #e9e9e9;
}

.filter-input::placeholder {
    color: #666;
}

/* Ensure consistent height for select elements */
.filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Style for number inputs */
.filter-input[type="number"] {
    -moz-appearance: textfield;
}

.filter-input[type="number"]::-webkit-outer-spin-button,
.filter-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ensure consistent spacing between filter groups */
.filter-group + .filter-group {
    margin-top: 16px;
}

/* Make sure the last filter group doesn't have extra margin */
.filter-group:last-child {
    margin-bottom: 0;
}

/* Ensure filter actions align with other sections */
.filter-actions {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    padding-left: 2rem;
}

/* Ensure buttons in filter actions are properly aligned */
.filter-actions .search-button,
.filter-actions .advanced-search-button {
    margin: 0;
    white-space: nowrap;
}

.advanced-search-form button.reset-button {
    width: 100%;
    margin: revert-layer;
    color: #000;
    background: none;
    font-size: 1rem;
    padding: 10px;
    border: none;
}
.advanced-search-form button.reset-button:hover {
    background: none;
}

/* Restore original filter actions styles */
.essential-filters .filter-actions button {
    width: auto;
    padding: 8px 14px;
}

.essential-filters .filter-actions button.advanced-search-button {
    background: none;
    border: none;
    color: #000;
    padding-left: 10px;
    padding-right: 0;
}

.price-range-slider {
    padding: 10px 0 0;
}

.price-range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label,
.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
}

.search-button,
.advanced-search-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.search-button {
    background-color: #007bff;
    color: #fff;
}

.search-button:hover {
    background-color: #0056b3;
}

.advanced-search-button {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.advanced-search-button:hover {
    background-color: #e9ecef;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999; /* Increased z-index */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10000; /* Ensure it's above the modal content */
    padding: 5px;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

/* Ensure the modal content is scrollable */
.modal-content {
    -webkit-overflow-scrolling: touch;
}

/* Add a backdrop blur effect */
.modal::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}


/* Responsive Design */
/* Mobile: 767px and lower */
@media (max-width: 767px) {
    .property-search-form {
        margin: 0rem;
        padding: 8px 0rem;;
    }

    .search-form {
        flex-direction: column;
    }

    .form-group {
        width: 100%;
        border: none;
    }

    .search-button {
        width: 100%;
        margin-top: 0.5rem;
    }
    .property-search-form .search-form .search-button {
        width: 100%;
        font-size: 1rem;
        padding: 16px;
    }
}

/* Responsive adjustments */
/* Tablet: 768px to 1024px */
@media (max-width: 1024px) and (min-width: 768px) {
    #property-search-form {
        flex-wrap: wrap;
    }
    
    .filter-section {
        flex: 1 1 calc(50% - 1rem);
        min-width: 180px;
    }
}

/* Mobile: 767px and lower */
@media (max-width: 767px) {
    #property-search-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-section {
        flex: 1 1 100%;
    }
    
    .filter-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .search-button,
    .advanced-search-button {
        width: 100%;
    }

    .modal.active .modal-content {
        max-height: 90vh;
        margin: 5vh auto;
        position: absolute;
        margin-left: 4vw;
        margin-right: 4vw;
        width: 92vw;
    }
}

/* Responsive Design */
/* Mobile: 767px and lower */
@media (max-width: 767px) {
    .filter-actions {
        flex-direction: column;
    }

    .search-button,
    .advanced-search-button {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    .advanced-search-form button {
        width: 100%;
    }
    .advanced-search-form button.search-button {}
    .advanced-search-form button.reset-button {
        width: 100%;
        margin: revert-layer;
        color: #000;
        background: none;
        font-size: 1rem;
        padding: 10px;
        border: none;
    }
} 