@import 'components/ShareModal.css';
@import 'components/FavoritesModal.css';
@import 'components/filter-tags.css';
@import 'components/noui-slider.css';
/* Base Styles */
.property-search-container {
    max-width:100%;
    margin: 0 auto;
    padding: 0;
}

.property-search-container {

}

.multi-select-trigger{
    color: var(--neutral-dark);
}

/* Search Form */
.search-form {
    background-color: #f8f9fa;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-inputs {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    /*gap: 10px;*/
    align-items: center;
}

.search-inputs-wrap{
    display: flex;
    flex-direction: row;
}


.input-group {
    flex: none;
    /*min-width: 184px;*/
}
.beds-dropdown-input {
    flex: none;
    min-width: 144px;
}

.property-type-dropdown-input {
    flex: none;
    min-width: 160px;
}

/* Date Picker */
.date-picker-group {
    flex: 0;
    min-width: 250px;
}

.date-picker-wrapper {
    position: relative;
    display: inline-block;
    width: auto;
}

.date-picker-group .date-picker-wrapper .flatpickr-wrapper .flatpickr-calendar {
    z-index: 1000000;
}

input.date-picker-input {
    width: 100%;
    min-width: 250px;
    padding-right: 45px; /* Add space for the icon */
    padding-left: 15px;
    padding-top: 12px;
    padding-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px !important;
    box-sizing: border-box;
}

.calendar-icon{
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Prevents icon from blocking clicks */
    color: var(--primary);
    font-size: 16px;
}



.date-picker-input::placeholder{
    color: var(--neutral-dark);
}

input.date-picker-input {
    padding: 10px 12px;
}

.secondary-search-actions{
    display: flex;
    margin-left: auto;
}

.date-picker-group .date-picker-wrapper .flatpickr-wrapper .date-picker-input {
    max-height: 54px;
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    /*border-radius: 4px;*/
    padding: 13px 12px;
    cursor: pointer;
}

.date-picker-input input {
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

.date-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 300px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
    margin-top: 5px;
}

.date-range-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-range-selector input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.apply-dates-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 10px;
    color: #555;
}

.clear-dates-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #888;
}

/* Dropdowns */
.dropdown-select {
    font-size: 15px;
    max-height: 54px;
    max-width: 185px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    /*border-radius: 4px;*/
    background-color: white;
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"><path stroke="%2383c8f7" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 35px; /* Add space for the arrow */
}

.beds-dropdown-select {
    width: 145px;
}

.property-types-dropdown-select {
    width: 175px;
}


.resorts-dropdown-select, .dropdown-resorts-input {
    min-width: 224px;
}

/* Filters Button */
.filters-button {
    height: 131px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 16px 15px;
    background-color: var(--tertiary-dark);
    color: var(--white);
    border: 1px solid #ddd;
    /*border-radius: 4px;*/
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

.favorites-button i, .viewed-button i, .share-button i{
    font-size: 32px;
    display: grid;
    text-align: center;
    row-gap: 2px;
}


.filters-button:hover {
    background-color: var(--tertiary);

}


.modal-icon {
    width: 18px;
    height: 18px;
}

/* Main Content Layout (Split into columns) */
.search-content-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* Advanced Filters */
.advanced-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

/* Results Column */
.search-results-column {
    flex: 2;
    overflow-y: auto;
    position: relative;
}

/* Map Column */
.map-column {
    top: 0;
    flex: 1;
    position: sticky;
    min-width: 300px;
    height: 100%;
    z-index: 1; /* Ensure map appears above other elements */
}

.properties-map-container {
    position: sticky;
    top: 20px;
    height: calc(100vh - 150px);
    min-height: 500px; /* Ensure minimum height */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #f0f0f0; /* Visible background color */
}

.properties-map {
    width: 100%;
    height: 100%;
    background-color: #e9ecef;
    display: block !important; /* Force display */
}

.map-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    font-size: 16px;
    color: var(--neutral-dark);
}

/* Search Results */
.loading, .error-message, .no-results {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 4px;
}

.error-message {
    color: #dc3545;
}

.results-count {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.search-results-column .results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.view-property-btn {
    display: inline-block;
    background-color: #006ce5;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s;
}

.view-property-btn:hover {
    background-color: #0056b3;
}



/* Load More Button */
.load-more-btn {
    display: block;
    margin: 30px auto 0;
    padding: 10px 25px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.load-more-btn:hover {
    background: #e0e0e0;
}

/* Infinite Scroll Components */
.results-end-marker {
    padding: 20px 0;
    text-align: center;
}

.loading-more {
    display: inline-block;
    color: #666;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.no-more-results {
    color: #888;
    font-size: 14px;
    padding: 10px;
}

/* Map Marker Styles for both Advanced and Standard markers */
.map-marker {
    position: relative;
}

.map-marker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    background-color: #006ce5;
    transform: rotate(-45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.map-marker-icon.active {
    background-color: #ff5722;
    transform: rotate(-45deg) scale(1.2);
    z-index: 10;
}

.map-marker-inner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: white;
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #006ce5;
    font-weight: bold;
    font-size: 12px;
}

.map-marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 100;
}

.map-marker:hover .map-marker-tooltip {
    visibility: visible;
    opacity: 1;
}

/* Info Window Styles for Standard Markers */
.property-info-window {
    padding: 8px;
    max-width: 200px;
}

.property-info-window h3 {
    font-size: 14px;
    margin: 0 0 6px;
    font-weight: 600;
}

.property-info-window p {
    font-size: 12px;
    margin: 0 0 4px;
    color: #555;
}

/* Filter Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    font-size: var(--text-xl);
    color: var(--tertiary-dark);
    font-weight: 600;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title h5 {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    color: #333;
}

.modal-close-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close-button:hover {
    background-color: #f3f4f6;
}

.modal-close-icon {
    width: 24px;
    height: 24px;
    color: #666;
}

.modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 48px 24px 24px;
    max-height: calc(90vh - 130px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

/* Filter Grid Styles */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.filter-column {
    display: flex;
    flex-direction: column;
}

.filter-heading {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.filter-section {
    margin-bottom: 24px;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0;
}

.checkbox-item label{
    margin-bottom: 0;
}
.checkbox-input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

/* Resort Styles */
.resort-group {
    margin-bottom: 12px;
}

.resort-toggle, .filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 6px 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
    color: #4b5563;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.resort-toggle:hover, .filter-toggle:hover {
    color: var(--primary);
}

.resort-toggle-icon, .filter-toggle-icon {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
    font-size: 12px;
}

.resort-toggle-icon.expanded, .subarea-toggle-icon.expanded {
    transform: rotate(90deg);
}

.subitem-toggle-text {
    font-weight: 500;
    font-size: 14px;
}

.resort-items, .three-column-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-left: 24px;
    margin-top: 8px;
}

.resort-item {
    padding: 3px 0;
    margin-bottom: 4px;
}

.loading-resorts {
    padding: 10px 0;
    font-style: italic;
    color: #666;
}

.show-more-button {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 12px;
    transition: background-color 0.2s;
}

.show-more-button:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

/* Filter Summary Styles */
.filter-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.filter-count {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
}

.filter-count-number {
    font-weight: 600;
    color: var(--primary);
    margin-right: 5px;
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-action-button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.filter-action-button:hover {
    opacity: 0.8;
}

.filter-action-divider {
    margin: 0 8px;
    color: #ccc;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-light);
    border: 1px solid var(--primary-light);
    border-radius: 30px;
    padding: 4px 8px;
    font-size: 13px;
    color: var(--tertiary-dark);
}

.filter-tag-remove {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.filter-tag-remove:hover {
    color: #ff0000;
}

.filter-description {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    font-style: italic;
}

.no-filters-message {
    font-size: 14px;
    color: #888;
    font-style: italic;
    padding: 10px 0;
}

/* New styles for the three-column layout */
.filter-grid.three-column, .filter-options.three-column {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Style for the destinations column that spans 2 columns */
.filter-column.destinations-column {
    grid-column: span 2;
}

/* Make the destinations display in 2 columns */
.checkbox-group.two-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 20px;
}

/* Apply Button */
.apply-button {
    width: 100%;
    padding: 12px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-button:hover {
    background-color: #2563eb;
}

/* Fix for scrolling issues */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .search-content-container {
        flex-direction: column-reverse;
    }

    .map-column {
        width: 100%;
    }

    .properties-map-container {
        position: relative;
        height: 400px;
        top: 0;
        margin-bottom: 20px;
    }

    .search-results-column {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .search-inputs {
        flex-direction: column;
    }

    .input-group,
    .date-picker-group {
        width: 100%;
    }

    .property-image {
        height: 180px;
    }

    .filter-grid.three-column {
        grid-template-columns: 1fr;
    }

    .filter-column.destinations-column {
        grid-column: span 1;
    }

    .checkbox-group input[type="checkbox"] {
        margin-right: 10px;
        margin-top: 0;
    }

    .checkbox-group.two-columns {
        grid-template-columns: 1fr;
    }

    .resort-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-content {
        padding: 16px;
    }
}

/* Property List Item Variant for Medium Screens */
@media (min-width: 768px) and (max-width: 1200px) {
    .property-image {
        width: 300px;
        height: auto;
    }

    .property-details {
        padding: 15px 20px;
    }
}

@media (max-width: 600px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .resort-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

.favorites-button-container button, .viewed-button-container, .share-button-container{
    font-size: 14px;
}

.favorites-button .icon{
    width: 50px;
    height: 50px;
    background: url(/wp-content/uploads/favorite-search.svg) no-repeat;
    background-size: 28px;
    background-position: center;
}

.viewed-button .icon{
    width: 50px;
    height: 50px;
    background: url(/wp-content/uploads/search-viewed.svg) no-repeat;
    background-size: 28px;
    background-position: center;
}

.share-button .icon{
    width: 50px;
    height: 50px;
    background: url(/wp-content/uploads/search-share.svg) no-repeat;
    background-size: 28px;
    background-position: center;
}


/* View Toggle Button Styles */
.view-toggle-button, .favorites-button, .viewed-button,  .share-button  {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 56px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 8px;
    color: #666;
    background-position: center;
    font-size: 14px;
    font-weight: 500;
    gap: 4px;
}


.view-toggle-button .icon {
    width: 50px;
    height: 50px;
    background-size: 50px;
}

.view-toggle-button.split-active .icon {
    background: url(/wp-content/uploads/split-view.svg) no-repeat;
    background-size: 28px;
    background-position: center;
}

.view-toggle-button.grid-active .icon {
    background: url(/wp-content/uploads/grid-view-new.svg) no-repeat;
    background-size: 28px;
    background-position: center;
}

.view-toggle-button .text {
    /*display: block;*/
    /*text-align: center;*/
    /*white-space: nowrap;*/
    /*font-size: 11px;*/
    /*line-height: 1.2;*/
}


.viewed-modal {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    /* Add positioning relative to the button */
}





.view-toggle-button i {
    font-size: 55px;
}

/* View Modes */
.search-content-container {
    display: flex;
    transition: all 0.3s ease;
}

/* Split View - Default */
.search-content-container.split-view {
    flex-direction: row;
}

.split-view .search-results-column {
    width: 66.66%;
    padding-right: 15px;
}

.split-view .map-column {
    width: 33.33%;
    position: sticky;
    top: 0;
    height: 100vh;
}

/* Grid View */
.search-content-container.grid-view {
    flex-direction: column;
}

.grid-view .search-results-column {
    width: 100%;
    padding-right: 0;
}

.grid-view .map-column {
display: none;
}

.br-area-property-search-container{
    width: 100%;
}

.favorites-button-container, .viewed-button-container, .share-button-container, .view-toggle-button{
    margin-left: 25px;
    background: none;
}

.favorites-button-container button, .viewed-button-container button, .share-button-container button {
    /*margin-left: 25px;*/
    background: none;
}





.split-view .results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-view .results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1367px) {
    .split-view .results-grid {
        grid-template-columns: repeat(2, 1fr);

    }
}


/* Responsive adjustments */
@media (max-width: 1200px) {
    .grid-view .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .split-view .search-results-column {
        width: 60%;
    }

    .split-view .map-column {
        width: 40%;
    }

    .split-view .results-grid,
    .grid-view .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-content-container.split-view {
        flex-direction: column;
    }

    .split-view .search-results-column,
    .split-view .map-column {
        width: 100%;
    }

    .split-view .map-column {
        height: 400px;
    }

    .split-view .results-grid,
    .grid-view .results-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Property Search Styles */

/* Base responsive breakpoints */
@media (max-width: 768px) {

    .flatpickr-wrapper{
        width: 100%;
    }

    /* Mobile Search Container */
    .property-search-container.mobile {
        padding-bottom: 0; /* Remove bottom padding since nav is now in search form */
        min-height: 100vh;
        position: relative;
    }

    /* Mobile Search Form */
    .search-form .mobile-search-inputs {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        position: relative;
        z-index: 100;
        transition: all 0.3s ease;
    }

    /* Mobile Navigation Row */
    .mobile-nav-row {
        width: 100%;
        display: flex;
        justify-content: space-around;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
    }

    .mobile-nav-btn {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        min-width: 60px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
        border-radius: 8px;
        flex: 1;
        max-width: 80px;
    }

    .mobile-nav-btn:hover,
    .mobile-nav-btn.active {
        color: #007bff;
        background: rgba(0,123,255,0.1);
    }

    .mobile-nav-btn:active {
        transform: scale(0.95);
    }

    .mobile-nav-btn .brxe-icon {
        font-size: 18px;
        margin-bottom: 2px;
        transition: transform 0.2s ease;
    }

    .mobile-nav-btn.active .brxe-icon {
        transform: scale(1.1);
    }

    .mobile-nav-btn span {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1;
    }

    /* Navigation Badges */
    .nav-badge {
        position: absolute;
        top: 4px;
        right: 8px;
        background: #dc3545;
        color: white;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 10px;
        font-weight: 600;
        min-width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Search Rows */
    .mobile-search-row {
        display: flex;
        gap: 14px;
        width: 100%;
    }

    .mobile-search-row:first-child {
        /* First row: dates + filters */
    }

    .mobile-search-row:last-child {
        /* Second row: bedrooms */
    }

    /* Mobile Date Picker */
    .mobile-date-picker {
        flex: 1;
        min-width: 0;
    }

    .mobile-date-picker .date-picker-input {
        font-size: 14px;
        padding: 12px 40px 12px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: white;
        width: 100%;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-date-picker .date-picker-input::placeholder {
        color: var(--primary);
        font-weight: 500;
    }

    /* Mobile Filters Button */
    .mobile-filters-button {
        height: 110px;
        padding: 0;
        gap: 0;
        background: var(--tertiary-dark);
        color: white;
        border: none;
        border-radius: var(--radius);
        font-size: 14px;
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        min-width: 100px;
        justify-content: center;
    }

    .mobile-filters-button:hover {
        background: #333;
    }

    .mobile-filters-button .modal-icon {
        width: 25px;
        height: 38px;
    }

    /* Mobile Bedrooms Dropdown */
    .mobile-bedrooms {
        width: 100%;
    }

    .mobile-dropdown {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        background: white;
        font-size: 14px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .dropdown-arrow{
        color: var(--primary);
    }

    /* Mobile Content Container */
    .search-content-container.mobile-content {
        padding: 0;
        margin: 0;
        height: auto; /* Let content flow naturally */
        position: relative;
    }

    /* Mobile Map Container */
    .mobile-map-container {
        width: 100%;
        height: 60vh; /* Take most of remaining space below search form */
        position: relative;
        min-height: 400px;
    }

    .mobile-map-container .map-wrapper {
        height: 100%;
        width: 100%;
    }

    /* Mobile Properties Tab (replaces old drag tab) */
    .mobile-properties-tab {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        z-index: 1001;
        cursor: pointer;
        user-select: none;
        touch-action: pan-y;
        transition: transform 0.3s ease;
        width: 100%;
        border: 1px solid #e0e0e0;
    }

    .mobile-properties-tab:active {
        /*transform: translateX(-50%) scale(0.98);*/
    }

    .drag-handle {
        width: 40px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 12px auto 8px;
    }

    .properties-tab-content {
        padding: 12px 20px 16px;
        text-align: center;
    }

    .properties-count {
        color: #333;
        font-weight: 600;
        font-size: 14px;
    }

    /* Mobile List Overlay */
    .mobile-list-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1002;
        overflow-y: auto;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .overlay-header {
        padding: 20px 16px 8px;
        border-bottom: 1px solid #f0f0f0;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }

    .overlay-header .results-count {
        font-size: 16px;
        font-weight: 600;
        color: #333;
        text-align: center;
    }

    .overlay-content {
        padding: 16px;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Mobile Results Container */
    .mobile-results-container {
        width: 100%;
        height: 100%;
        overflow-y: auto;
        padding: 16px;
        background: #f8f9fa;
    }

    /* Mobile Results Header */
    .mobile-results-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid #dee2e6;
    }

    .mobile-results-header .results-count {
        font-size: 14px;
        font-weight: 600;
        color: #333;
    }

    .mobile-sort {
        font-size: 12px;
        padding: 6px 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: white;
    }

    /* Mobile Results Grid */
    .mobile-results-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Mobile Bottom Navigation */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #dee2e6;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }

    .mobile-bottom-nav.map-mode {
        /* In map mode, keep navigation visible but with different styling */
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
    }

    .mobile-bottom-nav.list-mode {
        /* In list mode, normal styling */
        background: white;
    }

    .mobile-nav-item {
        background: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 12px;
        min-width: 60px;
        position: relative;
        cursor: pointer;
        transition: all 0.2s ease;
        border-radius: 8px;
    }

    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: #007bff;
        background: rgba(0,123,255,0.1);
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
    }

    .mobile-nav-item .brxe-icon {
        font-size: 18px;
        margin-bottom: 2px;
        transition: transform 0.2s ease;
    }

    .mobile-nav-item.active .brxe-icon {
        transform: scale(1.1);
    }

    .mobile-nav-item span {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        line-height: 1;
    }

    /* Mobile Navigation Badges */
    .mobile-nav-badge {
        position: absolute;
        top: 4px;
        right: 8px;
        background: #dc3545;
        color: white;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 10px;
        font-weight: 600;
        min-width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Modal Adjustments */
    .modal-overlay {
        z-index: 1100; /* Above bottom nav */
    }

    .modal-container {
        margin: 20px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    /* Mobile Property Cards */
    .mobile-results-grid .property-card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        background: white;
        overflow: hidden;
        margin-bottom: 0; /* Remove since we're using gap */
    }

    /* Mobile Favorites/Viewed/Share Modals */
    .mobile .favorites-modal,
    .mobile .viewed-modal,
    .mobile .share-modal {
        position: fixed;
        top: 80px; /* Above bottom nav */
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        max-width: 400px;
        border-radius: 12px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    }

    /* Mobile-specific optimizations */
    .mobile-device .property-card-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .mobile-device {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Loading and Error States for Mobile */
    .mobile .loading,
    .mobile .error-message,
    .mobile .no-results {
        text-align: center;
        padding: 40px 20px;
        font-size: 16px;
    }

    .mobile .loading-more {
        text-align: center;
        padding: 20px;
        font-size: 14px;
        color: #666;
    }

    /* Mobile Search Input Focus States */
    .mobile-date-picker .date-picker-input:focus,
    .mobile-dropdown:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
    }

    /* Safe area adjustments for iOS */
    @supports (padding-bottom: env(safe-area-inset-bottom)) {
        /*.mobile-properties-tab {*/
        /*    bottom: calc(20px + env(safe-area-inset-bottom));*/
        /*}*/
    }
}

/* Tablet Portrait Mode */
@media (max-width: 768px) and (min-width: 481px) {
    .mobile-search-row {
        flex-wrap: wrap;
    }

    .mobile-date-picker {
        flex: 4;
        min-width: 200px;
    }

    .mobile-filters-button {
        flex: 1;
        min-width: 120px;
    }

    .mobile-bedrooms {
        flex: 1;
        min-width: 150px;
    }
}

/* Phone Portrait Mode */
@media (max-width: 480px) {
    .mobile-search-inputs {
        padding: 12px;
    }

    .mobile-search-row {
        gap: 8px;
    }

    .mobile-filters-button {
        padding: 12px 16px;
        min-width: 90px;
    }

    .mobile-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .mobile-nav-item .brxe-icon {
        font-size: 16px;
    }

    .mobile-nav-item span {
        font-size: 9px;
    }

    .mobile-results-container {
        padding: 12px;
    }

    .modal-container {
        margin: 10px;
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .search-content-container.mobile-content {
        height: auto; /* Let content flow naturally in landscape */
    }

    .mobile-properties-tab {
        bottom: 10px; /* Reduce spacing in landscape */
    }

    .mobile-nav-btn {
        padding: 4px 8px;
    }

    .mobile-nav-btn .brxe-icon {
        font-size: 16px;
    }

    .mobile-nav-btn span {
        font-size: 8px;
    }
}

/* High DPI Displays */
@media (max-width: 768px) and (-webkit-min-device-pixel-ratio: 2) {
    .mobile-bottom-nav {
        border-top-width: 0.5px;
    }

    .mobile-search-inputs {
        border-bottom-width: 0.5px;
    }
}



/* Animation Support */
@media (max-width: 768px) {
    .mobile-nav-btn {
        transition: all 0.2s ease;
    }

    .mobile-filters-button {
        transition: all 0.2s ease;
    }

    .modal-overlay {
        animation: fadeIn 0.3s ease;
    }

    /* View transition animations */
    .search-content-container.mobile-content {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-map-container {
        display: contents;
        animation: slideInMap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-results-container {
        animation: slideInList 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Drag and swipe animations */
    .mobile-properties-tab {
        will-change: transform;
    }

    .mobile-list-overlay {
        will-change: transform, opacity;
    }

    /* Keyframe animations */
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    @keyframes slideInMap {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes slideInList {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Bounce animation for properties tab */
    .mobile-properties-tab.bounce {
        animation: bounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes bounce {
        0% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-10px); }
        100% { transform: translateX(-50%) translateY(0); }
    }

    /* Smooth transitions for touch interactions */
    .mobile-nav-btn,
    .mobile-properties-tab,
    .mobile-filters-button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Haptic feedback simulation with subtle scale */
    .mobile-nav-btn:active,
    .mobile-properties-tab:active,
    .mobile-filters-button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    /* Update references to mobile nav btn instead of nav item */
    .mobile-properties-tab:active {
        transform: translateX(-50%) scale(0.98);
    }
}

/* Accessibility Improvements for Mobile */
@media (max-width: 768px) {
    .mobile-nav-btn:focus,
    .mobile-filters-button:focus,
    .mobile-date-picker .date-picker-input:focus,
    .mobile-dropdown:focus,
    .mobile-properties-tab:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }

    .mobile-nav-btn:focus-visible {
        background: rgba(0,123,255,0.1);
        border-radius: 8px;
    }

    .mobile-properties-tab:focus-visible {
        box-shadow: 0 4px 20px rgba(0,0,0,0.15), 0 0 0 2px #007bff;
    }

    .resort-items, .three-column-items {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 8px;
        margin-left: 0;
    }


}

/* Print Styles for Mobile */
@media print and (max-width: 768px) {
    .mobile-properties-tab,
    .mobile-nav-row {
        display: none;
    }

    .property-search-container.mobile {
        padding-bottom: 0;
    }

    .mobile-map-container {
        height: 300px; /* Fixed height for printing */
    }


}

