/**
 * Search Form Styles
 * Modern and responsive search form for property listings
 */

/* Search Form Section */
.search-form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.search-form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23eb2027" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23eb2027" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23eb2027" opacity="0.05"/><circle cx="10" cy="60" r="0.5" fill="%23eb2027" opacity="0.05"/><circle cx="90" cy="40" r="0.5" fill="%23eb2027" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.search-form-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(235, 32, 39, 0.1);
}

.search-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.search-form-header h3 {
    color: #171b2a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.search-form-header h3 i {
    color: #eb2027;
    font-size: 24px;
}

.search-form-header p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Search Form Grid */
.search-form-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #171b2a;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.form-group label i {
    color: #eb2027;
    font-size: 16px;
    width: 16px;
    text-align: center;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    color: #171b2a;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #eb2027;
    box-shadow: 0 0 0 3px rgba(235, 32, 39, 0.1);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Checkbox Groups */
.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #171b2a;
    margin: 0;
}

.checkbox-label:hover {
    background: #eb2027;
    color: #ffffff;
    border-color: #eb2027;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(235, 32, 39, 0.3);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    background: #ffffff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #eb2027;
    border-color: #eb2027;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:checked ~ i {
    color: #ffffff;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.search-btn, .clear-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.search-btn {
    background: linear-gradient(135deg, #eb2027 0%, #c41e3a 100%);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(235, 32, 39, 0.3);
    padding: 12px 20px;
    font-size: 14px;
    min-width: 120px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(235, 32, 39, 0.4);
}

.clear-btn {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
    padding: 10px 16px;
    font-size: 13px;
    min-width: 100px;
}

.clear-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-form-container {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .search-form-header h3 {
        font-size: 24px;
        flex-direction: column;
        gap: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-btn, .clear-btn {
        width: 100%;
        min-width: auto;
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-form-section {
        padding: 40px 0;
    }
    
    .search-form-container {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .search-form-header h3 {
        font-size: 20px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .checkbox-label {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .search-btn, .clear-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Loading States */
.form-control:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-control:disabled:focus {
    border-color: #e9ecef;
    box-shadow: none;
    transform: none;
}

/* Animation for form appearance */
.search-form-container {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for form elements */
.form-group:hover .form-control {
    border-color: #ced4da;
}

.form-group:hover label i {
    color: #c41e3a;
}

/* Focus states */
.form-control:focus + label i,
.form-group:focus-within label i {
    color: #eb2027;
}

/* Custom select styling */
.form-control select {
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%236c757d' 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;
}

/* Number input styling */
.form-control[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.form-control[type="number"]::-webkit-outer-spin-button,
.form-control[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Results count display */
.search-results-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
    border: 1px solid #bbdefb;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-results i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-results h4 {
    color: #495057;
    margin-bottom: 10px;
}

.no-results p {
    margin: 0 0 20px 0;
}

.no-results .search-btn {
    padding: 10px 16px;
    font-size: 13px;
    min-width: 100px;
}
