/* Base styles */

/* Update mobile viewport height handling */
:root {
    /* Default fallback */
    --vh: 1vh;
}

body {
    font-family: 'Fira Sans', sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
}

/* Main Layout Structure */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}



/* Search Container */
.search-container {
    flex: 1; /* Takes available space */
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem; /* Added left padding for icon */
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    font-family: 'Fira Sans';
    box-sizing: border-box;
    height: 44px; /* Fixed height for alignment */
}

#location-search:focus-visible {
    outline-color: #00a499;
}

/* Main Content Area */
.content-area {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

/* Results Section */
.results-section {
    width: 40%;
    border-right: 1px solid #e5e5e5;
    background: white;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.search-filters-bar {
    width: 100%;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem;
    flex-shrink: 0;
    box-sizing: border-box;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-container {
    flex: 1;
    position: relative;
}

.filters-container {
    position: relative;
}

.filters-toggle {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    background: white;
    font-family: 'Fira Sans';
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filters-toggle:hover {
    border-color: #00A499;
}

.filters-toggle.active {
    border-color: #00A499;
    box-shadow: 0 0 0 1px #00A499;
}

.filter-count {
    background: #00A499;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 3rem;
    font-size: 0.75rem;
    display: none;
}

.filter-count.visible {
    display: inline-block;
}

.filters-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 1rem;
    min-width: 300px;
    max-width: 350px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.filters-panel.visible {
    display: block;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.filter-input-group {
    display: flex;
    gap: 0.5rem;
}

.filter-select,
.filter-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    font-family: 'Fira Sans';
    font-size: 0.875rem;
}

/* Boundary Filter Styles */
.boundary-filter-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.boundary-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.boundary-toggle:hover {
    background-color: #f9fafb;
}

.boundary-toggle-input {
    position: relative;
    width: 44px;
    height: 24px;
    appearance: none;
    background-color: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.boundary-toggle-input:checked {
    background-color: #00A499;
}

.boundary-toggle-input::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.boundary-toggle-input:checked::before {
    transform: translateX(20px);
}

.boundary-toggle-text {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.boundary-info {
    padding-left: 0.5rem;
}

.boundary-description {
    color: #6b7280;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Boundary highlight animation for new users */
.boundary-highlight {
    animation: boundary-pulse 3s ease-in-out;
    border: 2px solid #FF6B35;
    border-radius: 0.5rem;
    background-color: rgb(145, 145, 145);
}

@keyframes boundary-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
    }
    25% {
        transform: scale(1.02);
        box-shadow: 0 0 0 8px rgba(255, 107, 53, 0.1);
    }
    50% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2);
    }
    75% {
        transform: scale(1.01);
        box-shadow: 0 0 0 6px rgba(255, 107, 53, 0.15);
    }
}

/* Boundary Toast Notification Styles */
.boundary-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Fira Sans', sans-serif;
}

.boundary-toast.toast-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.boundary-toast.toast-hiding {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: all 0.3s ease-out;
}

.toast-content {
    padding: 0;
    overflow: hidden;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 0 16px;
    margin-bottom: 8px;
}

.toast-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: #00a49928;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

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

.toast-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.toast-body {
    padding: 0 16px 16px 16px;
}

.toast-description {
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.toast-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
}

.toast-learn-more,
.toast-filters-btn {
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Fira Sans', sans-serif;
}

.toast-learn-more {
    background: #f9fafb;
    color: #374151;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    flex: 1;
}

.toast-learn-more:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.toast-filters-btn {
    background: #00a499;
    color: white;
    padding: 8px 16px;
    border: 1px solid #00a499;
}

.toast-filters-btn:hover {
    background: #009188;
    border-color: #009188;
}

.learn-more-icon {
    transition: transform 0.2s;
}

.toast-details {
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease-out;
}

.toast-details.details-visible {
    opacity: 1;
    transform: translateY(0);
}

.details-separator {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

.details-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.details-list {
    margin: 0 0 16px 0;
    padding-left: 16px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.details-list li {
    margin-bottom: 6px;
}

.details-tip {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #FF6B35;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .boundary-toast {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .toast-actions {
        flex-direction: column;
    }
    
    .toast-learn-more,
    .toast-filters-btn {
        justify-content: center;
    }
}

/* Property List */
.property-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.property-card {
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.property-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.property-name {
    font-weight: bold;
    margin: 0 0 0.5rem 0;
}

.property-address,
.property-units {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.property-card > p {
    margin: 0.5rem 0;
}

.property-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 5;
}

.save-property-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.save-property-btn:hover {
    transform: scale(1.1);
}

.save-property-btn i {
    color: #00A499;
    font-size: 1.1rem;
}

.save-property-btn.saved i {
    font-weight: 900; /* This doesn't actually work - we need to change the class */
    transform: scale(1.1);
    color: #00A499;
}

/* Count Badge */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    background-color: #00A499;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    padding: 0 0.25rem;
}

/* Stats Card hiding as of May 2025 */
.stats-card {
    display: none;
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    z-index: 1;
}

.stat-item {
    display: flex;
    align-items: center;
}

.stat-icon {
    margin-right: 0.25rem;
}

/* Property Details Panel */
.property-details {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 400px;
    max-width: calc(100vw - 2rem);
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    height: calc(100vh - 3.25rem);
    overflow-y: hidden;
    z-index: 1000;
}

.property-details.visible {
    display: block;
}

#property-details-content {
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.75);
    z-index: 50;
    justify-content: center;
    align-items: center;
}

.loading-overlay.visible {
    display: flex;
}

.spinner {
    height: 3rem;
    width: 3rem;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    border-bottom-color: #00A499;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Map Marker */
.marker-pin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #CF7F00;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Close Button */
.close-button {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

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

/* Property Details Content Styling */
.property-header {
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

.property-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.property-header .address {
    color: #666;
    margin-bottom: 1rem;
}

/* Property Details Stats Section */
.property-detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.property-detail-stat-item {
    background: #f8f8f8;
    padding: 1rem;
    border-radius: 0.375rem;
    display: flex;
    flex-direction: column;
}

.property-detail-stat-label {
    font-size: 0.875rem;
    color: #666;
}

.property-detail-stat-value {
    font-size: 1.125rem;
    font-weight: 600;
}

/* Rental Criteria Section */
.rental-criteria {
    margin-bottom: 1.5rem;
}

.rental-criteria h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.criteria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 3% 0;
    font-size: 0.9rem;
}

.criterion {
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.criterion-label {
    font-size: 0.875rem;
    color: #666;
}

.criterion-value {
    margin-left: 0.5rem;
}

/* Available Units Section */
.available-units {
    margin-bottom: 2rem;
}

/* Floorplan Accordion */
.floorplans-accordion {
    border-radius: 0.5rem;
    overflow: hidden;
}

.floorplan-group {
    border: 1px solid #e5e5e5;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.floorplan-header {
    width: 100%;
    padding: 1rem;
    background: #f8f8f8;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
    font-family: 'Fira Sans';
}

.floorplan-header:hover {
    background: #f0f0f0;
}

.floorplan-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 40px;
    gap: 1rem;
    align-items: center;
}

.floorplan-info {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floorplan-name {
    font-weight: 600;
}

.floorplan-group.expanded .accordion-icon {
    transform: rotate(180deg);
}

/* Unit Cards */
.floorplan-content {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-out;
    padding: 0 1rem;
}

.floorplan-group.expanded .floorplan-content {
    height: auto;
    opacity: 1;
    padding: 1rem;
}

.available-count {
    font-size: 0.875rem;
    color: #666;
    margin-left: 0.5rem;
}

.rent-range {
    font-size: 0.875rem;
    color: #666;
    text-align: right;
    white-space: nowrap;
}

.icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.accordion-icon {
    transition: transform 0.2s;
}

.floorplan-group.expanded .accordion-icon {
    transform: rotate(180deg);
}

/* Unit Cards */
.floorplan-content {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.3s ease-out;
    padding: 0 1rem;
}

.floorplan-group.expanded .floorplan-content {
    height: auto;
    opacity: 1;
    padding: 1rem;
}

.units-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.unit-card {
    background: #f8f8f8;
    border-radius: 0.5rem;
    padding: 1rem;
}

.unit-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.unit-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.unit-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.unit-number {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.25rem 0;
}

.unit-rent {
    font-size: 0.875rem;
    color: #666;
}

.listing-link {
    color: #00A499;
    text-decoration: none;
    font-size: 0.875rem;
}

.listing-link:hover {
    color: #008276;
}

.no-results {
    color: #666;
    text-align: center;
    padding: 1rem;
}

/* CSS additions for the search input */
.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 0.875rem;
}

.no-results-message {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.875rem;
}

/* Custom close button for info windows */
.custom-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 99;
    border: none;
    padding: 0;
}

.custom-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.95);
}

.custom-close-btn svg {
    width: 14px;
    height: 14px;
    fill: #666;
}

/* Google Maps InfoWindow Overrides */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
    min-width: 250px !important;
    min-height: 250px;
    max-height: 500px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    overflow: visible !important;
}

/* Hide the default Google Maps close button */
.gm-ui-hover-effect {
    display: none !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-height: 500px !important;
}

.gm-style .gm-style-iw-tc::after {
    box-shadow: none !important;
}

/* Remove top bar */
.gm-style-iw-chr {
    display: none;
}

/* Make sure header starts properly after the image */
.info-window-header {
    padding: 12px 12px 8px 12px !important;
    margin-top: 0 !important;
}

/* Update the container to accommodate the new layout */
.info-window-container {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    min-width: 250px;
    max-width: 320px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.info-window-title {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
}

.info-window-address {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.info-window-address svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: currentColor;
}

/* Availability Section */
.info-window-availability {
    padding: 10px 12px;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.availability-count {
    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-count svg {
    width: 16px;
    height: 16px;
    color: #0d9488;
}

.availability-count span {
    font-size: 14px;
    line-height: 1.4;
    color: #6b7280;
}

.availability-count strong {
    font-weight: 500;
    color: #111827;
}

.starting-price {
    font-size: 14px;
    line-height: 1.4;
}

.starting-price span {
    color: #6b7280;
}

.starting-price strong {
    font-weight: 500;
    color: #111827;
}

/* Unit Types Section */
.unit-types-container {
    padding: 12px;
    background: white;
}

.unit-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.unit-type-row:last-child {
    margin-bottom: 0;
}

.unit-type-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: #f3f4f6;
    color: #374151;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.unit-count {
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.unit-price {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    color: #111827;
}

/* Action Button Section */
.info-window-action {
    padding: 0 12px 12px 12px;
    background: white;
    display: flex;
}

.view-details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 12px;
    background: #0d9488;
    color: white;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.view-details-button:hover {
    background: #0f766e;
}

.view-details-button svg {
    width: 12px;
    height: 12px;
    margin-left: 6px;
}

/* Empty State */
.no-units-message {
    padding: 12px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

/* Info Window Style Adjustments */

/* Update the thumbnail dimensions to be wider than tall */
.info-window-thumbnail {
    width: 100%;
    height: 120px; /* Reduced from 140px for better aspect ratio */
    background-color: #f5f5f5;
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 0; /* Remove margin bottom for cleaner look */
    overflow: hidden;
    position: relative;
}

.info-window-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%; /* Slightly above center to show more of buildings */
}

.property-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.property-placeholder i {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.property-placeholder span {
    color: #666;
    font-size: 0.875rem;
}

/* Placeholder for street view image */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    font-size: 12px;
    color: #666;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    border-top-color: #00A499;
    animation: spin 1s linear infinite;
    margin-bottom: 5px;
}

.property-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    background-color: #f5f5f5;
    color: #666;
    text-align: center;
}

.property-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
}

.property-placeholder small {
    margin-top: 5px;
    color: #999;
    font-size: 11px;
}

/* Mobile View Toggle */
.mobile-view-toggle {
    display: none; /* Hidden by default on desktop */
}

/* Add these styles to your existing property_search.css file */

/* User authentication styles */
.header-nav .logout-link {
    transition: color 0.2s ease;
}

.header-nav .logout-link:hover {
    color: #Cf7F00;
}

.header-nav .highlight-link {
    color: #00A499;
    font-weight: 600;
}

/* User greeting */
.user-greeting {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.user-greeting .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #00A499;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-weight: 600;
}


/* Mobile styles */
@media (max-width: 768px) {
    .content-area {
        flex-direction: column;
    }

    .results-section {
        width: 100%;
        height: 100%; /* Take full height */
        border-right: none;
    }

    .map-container {
        display: block; /* Hide map on mobile */
    }

    .property-list {
        padding: 1rem;
    }

    .property-card {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
        /* border-radius: 0; */
        border-left: none;
        border-right: none;
        border-top: none;
        border: 1px solid #e5e5e5;
        border-radius: 0.5rem;
        padding: 1rem 0.75rem;
    }


    /* Adjust property card hover state for touch devices */
    .property-card:hover {
        box-shadow: none;
    }

    .property-card:active {
        background-color: #f5f5f5;
    }

    /* Hide stats card on mobile for now */
    .stats-card {
        display: none;
    }

    /* Add these new view toggle styles */
    .mobile-view-toggle {
        display: block;
        position: fixed;
        bottom: 1.5rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100;
    }

    .view-toggle-btn {
        background: #00A499;
        color: white;
        border: none;
        border-radius: 2rem;
        padding: 0.75rem 1.5rem;
        font-family: 'Fira Sans';
        font-size: 0.875rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        transition: background-color 0.2s ease;
    }

    .view-toggle-btn:hover {
        background: #008276;
    }

    /* View states for toggling */
    .content-area.show-map .results-section {
        display: none;
    }

    .content-area.show-map .map-container {
        display: block;
        height: calc(100vh - 180px);
    }

    /* Custom places autocomplete dropdown */
    .custom-pac-container {
        max-height: 30vh; /* Limit height on mobile */
        overflow-y: auto;
        /* Ensure it's above other elements */
        z-index: 1000;
    }

    .custom-pac-item {
        padding: 1rem 0.75rem; /* Match your mobile padding style */
        /* Make touch targets larger on mobile */
        min-height: 44px;
    }

    .filters-panel {
        position: absolute;
        top: calc(100% + 0.5rem);
        width: 92vw;
        right: 0; /* Align to right like the button */
        background: white;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 1rem;
        box-sizing: border-box;
        z-index: 100;
    }


    /* Make the filter inputs full width of their container */
    .filter-select,
    .filter-input {
        flex: 1;
        width: 100%;
        font-size: 16px;
    }

    /* Ensure filter groups take full width */
    .filter-group {
        width: 100%;
    }

    /* Give more space between filter groups */
    .filter-group:not(:last-child) {
        margin-bottom: 1.25rem;
    }


    .filter-label {
        margin-bottom: 0.5rem; /* More space below labels */
        font-size: 0.9rem;
    }

    .search-input {
        font-size: 16px !important; /* Minimum font size to prevent zoom on iOS */
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        -webkit-text-size-adjust: 100%; /* Prevent text size adjust on orientation change */
    }

    /* Ensure autocomplete suggestions are readable without zoom */
    .custom-pac-container {
        -webkit-text-size-adjust: 100%;
    }

    .custom-pac-item {
        font-size: 16px !important;
        padding: 12px 16px;
        min-height: 44px; /* Ensure touch targets are large enough */
    }

    .custom-pac-item-text {
        font-size: 16px !important;
    }

    .geography-badge {
        font-size: 14px !important;
    }

    .header-nav {
        gap: 1rem; /* Reduce spacing on mobile */
    }
}

@media (max-width: 768px) {

    html, body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
        touch-action: none; /* Prevent all touch actions on body */
    }

    .container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
        overflow: hidden;
        touch-action: none;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .content-area {
        height: calc(100% - 120px);
        overflow: hidden;
        touch-action: none;
    }

    .results-section {
        height: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y; /* Only allow vertical touch scrolling here */
        /* Prevent elastic scroll at the edges */
        overscroll-behavior: contain;
        /* Try to prevent parent scroll while scrolling this element */
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    .map-container {
        height: 100%;
        touch-action: auto; /* Allow all touch actions for map interaction */
    }

    /* Ensure search input remains interactive */
    .search-filters-bar {
        touch-action: auto;
    }

    /* Prevent any scrolling on the stats card */
    .stats-card {
        touch-action: none;
        bottom: calc(env(safe-area-inset-bottom, 1rem) + 1rem);
    }

    /* Ensure view toggle button remains interactive */
    .mobile-view-toggle {
        touch-action: manipulation;
        bottom: calc(env(safe-area-inset-bottom, 1.5rem) + 1.5rem);
    }

    .map-property-preview {
        position: absolute;
        width: 300px; /* Fixed width for consistent positioning */
        background: white;
        border-radius: 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        z-index: 1;
        opacity: 0;
        transform: translateY(10px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: auto;
        /* Remove top/right positioning to allow dynamic placement */
    }

    /* Add a pointer/arrow at the bottom */
    .map-property-preview::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid white;
    }
}

/* Handle devices with home indicator (iPhone X and newer) */
@supports (padding: env(safe-area-inset-bottom)) {
    .container {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
}

/* Standardized Results Header Styles */
.results-header {
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-bottom: 0.5px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #444;
    font-weight: 500;
}

.stat-icon {
    color: #00A499;
    width: 16px;
    height: 16px;
}

.stat-label {
    color: #666;
    font-weight: 400;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.sort-icon {
    color: #00A499;
}

.sort-label {
    font-size: 0.875rem;
    color: #666;
}

.sort-select-wrapper {
    position: relative;
}

.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: none;
    font-weight: 500;
    text-decoration: underline;
    width: 100%;
    border-radius: 0.375rem;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.875rem;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1rem;
    transition: border-color 0.2s;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #00A499;
}

.property-list {
    padding-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .results-header {
        padding: 0.75rem;
    }
    
    .results-stats {
        gap: 1rem;
    }
    
    .sort-select {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    /* For very small screens, make the header stack vertically */
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .results-stats {
        width: 100%;
    }
    
    .results-sort {
        width: 100%;
    }
    
    .sort-select {
        min-width: 0;
        width: auto;
        flex: 1;
    }
}

/* Property Type Filter Grid Styles */
.property-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.property-type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    background-color: white;
}

.property-type-card:hover {
    border-color: #00A499;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.property-type-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.property-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.property-type-content i {
    font-size: 1.25rem;
    color: #666;
}

.property-type-content span {
    font-size: 0.875rem;
}

/* Selected state */
.property-type-input:checked + .property-type-content {
    color: #00A499;
}

.property-type-input:checked + .property-type-content i {
    color: #00A499;
}

.property-type-input:checked ~ .property-type-card {
    border-color: #00A499;
    background-color: rgba(0, 164, 153, 0.05);
}

/* Make the entire card show selected state */
input[type="checkbox"]:checked + .property-type-content {
    color: #00A499;
}

.property-type-card input:checked ~ .property-type-content {
    color: #00A499;
}

.property-type-card input:checked ~ .property-type-content i {
    color: #00A499;
}

.property-type-card input:checked {
    border-color: #00A499;
    background-color: rgba(0, 164, 153, 0.05);
}

/* Selected style */
.property-type-card.selected {
    border-color: #00A499;
    background-color: rgba(0, 164, 153, 0.05);
}

.property-type-card.selected .property-type-content i,
.property-type-card.selected .property-type-content span {
    color: #00A499;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .property-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Premium Housing Accessibility Filters */
.accessibility-filter-container {
    position: relative;
}

.accessibility-toggle {
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8fffe 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.accessibility-toggle:hover {
    border-color: #00a499;
    box-shadow: 0 4px 12px rgba(0, 164, 153, 0.15);
    transform: translateY(-1px);
}

.accessibility-toggle:focus {
    outline: none;
    border-color: #00a499;
    box-shadow: 0 0 0 3px rgba(0, 164, 153, 0.1);
}

/* Subtle shimmer effect */
.accessibility-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 164, 153, 0.1),
        transparent
    );
    transition: left 2s ease-in-out;
}

.accessibility-toggle:hover::before {
    left: 100%;
}

.accessibility-toggle-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.accessibility-toggle-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.accessibility-toggle-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00a499 0%, #008a7e 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 164, 153, 0.3);
}

.accessibility-toggle-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.accessibility-toggle-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
    font-family: 'Fira Sans', sans-serif;
}

.accessibility-toggle-subtitle {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.2;
    font-family: 'Fira Sans', sans-serif;
}

.accessibility-toggle-badge {
    background: #00a499;
    color: white;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.accessibility-toggle-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.accessibility-toggle-arrow {
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accessibility-toggle-arrow i {
    font-size: 14px;
}

.accessibility-toggle.expanded .accessibility-toggle-arrow {
    transform: rotate(180deg);
    color: #00a499;
}

.accessibility-dropdown {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-radius: 12px;
    margin-top: 8px;
}

.accessibility-dropdown.expanded {
    max-height: max-content;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.accessibility-dropdown-content {
    padding: 16px;
}

.accessibility-category {
    margin-bottom: 20px;
}

.accessibility-category:last-child {
    margin-bottom: 0;
}

.accessibility-category-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Fira Sans', sans-serif;
}

.accessibility-options {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.accessibility-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid #e1e5e9;
    background: #ffffff;
    margin-bottom: 6px;
}

.accessibility-option:last-child {
    margin-bottom: 0;
}

.accessibility-option:hover {
    border-color: #00a499;
    background: #f8fffe;
}

.accessibility-option.checked {
    border-color: #00a499;
    background: #f0fdfc;
}

.accessibility-checkbox-wrapper {
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
}

.accessibility-input {
    opacity: 0;
    position: absolute;
    cursor: pointer;
    width: 0;
    height: 0;
}

.accessibility-checkbox-custom {
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    position: relative;
    transition: all 0.15s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accessibility-checkbox-custom::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.accessibility-input:checked + .accessibility-checkbox-custom {
    background: #00a499;
    border-color: #00a499;
}

.accessibility-input:checked + .accessibility-checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.accessibility-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
    cursor: pointer;
    font-family: 'Fira Sans', sans-serif;
    font-weight: 400;
    transition: color 0.15s ease;
    flex: 1;
}

.accessibility-input:checked ~ .accessibility-text {
    color: #00a499;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .accessibility-toggle {
        padding: 14px;
    }
    
    .accessibility-toggle-header {
        gap: 10px;
    }
    
    .accessibility-toggle-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .accessibility-toggle-title {
        font-size: 15px;
    }
    
    .accessibility-toggle-subtitle {
        font-size: 12px;
    }
    
    .accessibility-dropdown-content {
        padding: 12px;
    }
    
    .accessibility-option {
        padding: 10px 12px;
        margin-bottom: 4px;
    }
    
    .accessibility-text {
        font-size: 13px;
    }
    
    .accessibility-checkbox-custom {
        width: 15px;
        height: 15px;
    }
    
    .accessibility-checkbox-custom::after {
        width: 3px;
        height: 6px;
    }
}