/* Enhanced Property Search Styles */

/* Mobile Search Line */
.mobile-search-line {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    gap: 8px;
}

.search-input-mobile {
    position: relative;
    flex: 1;
}

.mobile-search-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.mobile-search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon-btn-mobile {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-icon-btn-mobile:hover {
    background: #2563eb;
}

.mobile-filters-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.mobile-filters-btn:hover,
.mobile-filters-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.mobile-save-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 60px;
}

.mobile-save-btn:hover {
    background: #059669;
}

.filter-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Desktop Enhanced Search Header */
.desktop-search-header {
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    gap: 16px;
}

.search-input-container-enhanced {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.main-search-input-enhanced {
    width: 100%;
    padding: 14px 50px 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.main-search-input-enhanced:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: white;
}

.search-icon-btn-enhanced {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-icon-btn-enhanced:hover {
    background: #2563eb;
    transform: translateY(-50%) scale(1.05);
}

/* Enhanced Filter Buttons */
.inline-filters-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn-enhanced {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    gap: 6px;
    white-space: nowrap;
}

.filter-btn-enhanced:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
    color: #3b82f6;
}

.filter-btn-enhanced.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.filter-btn-enhanced.has-selection {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.filter-btn-enhanced .dropdown-icon {
    transition: transform 0.2s ease;
}

.filter-btn-enhanced.active .dropdown-icon {
    transform: rotate(180deg);
}

/* Enhanced Filter Dropdowns */
.filter-dropdown-enhanced {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 50;
    padding: 20px;
    margin-top: 8px;
    min-width: 280px;
}

.more-filters-dropdown {
    min-width: 380px;
    max-height: 500px;
    overflow-y: auto;
}

.filter-section-title {
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 12px;
}

.filter-sublabel {
    font-weight: 500;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.filter-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Custom Checkboxes */
.checkbox-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    gap: 10px;
}

.checkbox-item:hover {
    background: #f9fafb;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-checkbox.checked {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.checkbox-label {
    font-size: 14px;
    color: #374151;
}

/* Price Input Enhancements */
.price-input-row-enhanced {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.price-input-enhanced {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.price-input-enhanced:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.price-separator {
    color: #6b7280;
    font-weight: 500;
}

/* Quick Price Ranges */
.quick-price-ranges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-range-btn {
    padding: 6px 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-range-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Story Tags */
.story-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.story-tag {
    padding: 8px 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-tag:hover,
.story-tag.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Save Search Button */
.save-search-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.save-search-btn:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Mobile Filter Overlay */
.mobile-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: flex-end;
}

.mobile-filter-panel {
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-filter-content {
    padding: 20px;
}

.mobile-filter-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.clear-filters-btn {
    flex: 1;
    padding: 12px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.apply-filters-btn {
    flex: 1;
    padding: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Enhanced Results Header */
.results-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 16px 0;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.results-count-enhanced {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.clear-all-btn {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: #dc2626;
    color: white;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 2px;
}

.view-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: #374151;
}

.view-btn.active {
    background: white;
    color: #3b82f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Sort Container */
.sort-container-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.sort-select-enhanced {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

/* Saved Searches */
.saved-searches-section {
    margin: 16px 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.saved-searches-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #374151;
}

.saved-searches-list {
    border-top: 1px solid #e5e7eb;
}

.saved-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
}

.saved-search-item:last-child {
    border-bottom: none;
}

.saved-search-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.saved-search-details {
    font-size: 14px;
    color: #6b7280;
}

.saved-search-actions {
    display: flex;
    gap: 8px;
}

.load-search-btn {
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.delete-search-btn {
    padding: 6px 8px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-search-btn:hover {
    background: #dc2626;
    color: white;
}

/* Map Info Window */
.map-info-window {
    padding: 12px;
    max-width: 200px;
}

.map-info-window h4 {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.map-info-window p {
    margin-bottom: 6px;
    font-size: 14px;
    color: #6b7280;
}

.view-property-link {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-search-header {
        display: none !important;
    }
    
    .results-header-enhanced {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .results-controls {
        justify-content: space-between;
    }
    
    .view-toggle {
        order: -1;
        justify-content: center;
    }
    
    .sort-container-enhanced {
        justify-content: flex-end;
    }
}

@media (min-width: 769px) {
    .mobile-search-line {
        display: none !important;
    }
    
    .mobile-filter-overlay {
        display: none !important;
    }
}

/* Loading States */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

/* Enhanced Property Cards for List View */
.property-card-list {
    display: flex;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
}

.property-card-list:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.property-card-list .property-image {
    width: 280px;
    height: 200px;
    object-fit: cover;
}

.property-card-list .property-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-card-list .property-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.property-card-list .property-location {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.property-card-list .property-features {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6b7280;
}

.property-card-list .property-price {
    font-size: 24px;
    font-weight: 700;
    color: #059669;
}

/* Enhanced Property Cards for Map View */
.property-card-map {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.2s ease;
}

.property-card-map:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.property-card-map .property-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.property-card-map .property-content {
    padding: 12px;
}

.property-card-map .property-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.3;
}

.property-card-map .property-price {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}

.property-card-map .property-features {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

/* Utility Classes */
.rotate-180 {
    transform: rotate(180deg);
}

.transition-transform {
    transition: transform 0.2s ease;
}

/* Focus States for Accessibility */
.filter-btn-enhanced:focus,
.view-btn:focus,
.save-search-btn:focus {
    outline: none;
    ring: 2px solid #3b82f6;
    ring-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar for Dropdown Lists */
.filter-dropdown-enhanced::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown-enhanced::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.filter-dropdown-enhanced::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.filter-dropdown-enhanced::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


