/* Frontend Styles for Listings */

/* Full-width map layout - override theme styles */
body.maloney-listings-active #main-content,
body.maloney-listing-single #main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.maloney-listings-active #main-content .container,
body.maloney-listing-single #main-content .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Full-width layout for listings archive page only */
body.maloney-listings-active:not(.single-listing) #content-area {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.maloney-listings-active:not(.single-listing) #left-area {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.maloney-listings-active #sidebar,
body.maloney-listing-single #sidebar {
    display: none !important;
}

/* Prevent background scroll when overlays/modals are open */
body.filter-modal-open {
    overflow: hidden;
}

/* Full-width Map Layout */
.listings-map-layout {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    clear: both;
}

/* Page Title */
.listings-page-title {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .listings-page-title {
        position: sticky;
        top: 0;
        z-index: 1002;
        padding: 15px 20px;
    }
    
    /* Lower z-index when filter modal is open */
    body.filter-modal-open .listings-page-title {
        z-index: 1;
    }
    
    body.filter-modal-open .listings-search-bar {
        z-index: 1;
    }
    
    body.filter-modal-open .mobile-view-toggle {
        z-index: 1;
    }
}

.listings-page-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* Search/Filter Bar */
.listings-search-bar {
    background: #f5f5f5;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    z-index: 2000;
    position: relative;
}

@media (max-width: 768px) {
    .listings-search-bar {
        position: sticky;
        top: 0;
        z-index: 1001;
        padding: 12px 20px;
    }
}

.listings-search-container {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    position: relative;
}

.search-location {
    display: flex;
    flex: 0 0 auto;
    position: relative;
    min-width: 200px;
}

.location-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 2002;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.location-autocomplete ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-autocomplete li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.location-autocomplete li:hover {
    background: #f5f5f5;
}

.location-autocomplete li:last-child {
    border-bottom: none;
}

.location-autocomplete .suggestion-icon {
    font-size: 16px;
    line-height: 1;
    color: #2d4f5e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-autocomplete .suggestion-pin {
    width: 16px;
    height: 16px;
}

.location-autocomplete .suggestion-primary {
    font-weight: 600;
    color: #1d1d1f;
}

.search-location {
    display: flex;
    flex: 1;
    min-width: 0;
}

.search-location input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
    min-width: 0;
    height: 44px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .search-location input[type="text"] {
        padding: 12px 12px;
        font-size: 14px;
    }
}

.search-btn {
    padding: 0;
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-left: 10px; /* Spacing between input and button */
}

.search-btn:hover {
    background: #005a87;
}

.filter-dropdowns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
}

.filter-dropdowns select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    min-width: 120px;
}

.filter-btn {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}

.filter-arrow {
    font-size: 12px;
    transition: transform 0.2s;
    display: inline-block;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.button-primary {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.filter-btn.button-primary:hover {
    background: #005a87;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.advanced-filters {
    width: auto;
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: absolute;
    top: auto;
    left: auto;
    right: auto;
    z-index: 2001;
    max-height: 80vh;
    overflow-y: auto;
    display: none; /* Hidden by default, shown via JavaScript */
}

.advanced-filters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.advanced-filters-grid .filter-group:first-child {
    grid-column: 1;
}

.advanced-filters-grid .filter-group:last-child {
    grid-column: 2;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Compact popover panels */
.filter-popover {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    padding: 8px 10px;
    z-index: 2100;
    min-width: 240px;
    max-width: 400px;
}
.filter-popover-content { min-width: 240px; }

/* Price filter: tabs use status-type-btn styling; min/max labels on top of fields; no overflow */
#popover_price_range .filter-popover-content {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}
.price-filter-fields {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}
.price-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 0;
}
.price-filter-field label {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}
.price-filter-sep {
    color: #666;
    flex-shrink: 0;
    padding-bottom: 6px;
}
.price-filter-select {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
}

.filter-popover-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-popover-header-title {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.filter-popover-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.filter-popover-title { 
    font-weight: 600; 
    margin: 4px 2px 8px 2px; 
    font-size: 16px;
}
.filter-popover-options { display: grid; grid-template-columns: repeat(5, auto); gap: 8px 10px; }
.filter-popover-options.two-col { 
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.filter-popover-options label { 
    font-weight: normal; 
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Button-style checkboxes and radios */
.filter-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 768px) {
    .filter-button-group {
        gap: 6px;
    }
}

.filter-option-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 60px;
    text-align: center;
    user-select: none;
}

@media (max-width: 768px) {
    .filter-option-button {
        padding: 10px 14px;
        font-size: 15px;
        min-width: 70px;
        min-height: 44px; /* Better touch target */
        flex: 1 1 auto;
    }
    
    .filter-button-group.two-col .filter-option-button {
        flex: 1 1 calc(50% - 3px);
    }
}

.filter-option-button:hover {
    border-color: #0073aa;
    background: #f0f7fa;
}

.filter-option-button input[type="checkbox"],
.filter-option-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.filter-option-button input[type="checkbox"]:checked + span,
.filter-option-button input[type="radio"]:checked + span {
    color: #0073aa;
    font-weight: 600;
}

.filter-option-button input[type="checkbox"]:checked ~ span,
.filter-option-button input[type="radio"]:checked ~ span {
    color: #0073aa;
    font-weight: 600;
}

.filter-option-button:has(input[type="checkbox"]:checked),
.filter-option-button:has(input[type="radio"]:checked),
.filter-option-button.checked {
    border-color: #0073aa;
    background: #e6f3f8;
}

.filter-option-button span {
    display: block;
    pointer-events: none;
}

.filter-popover-actions { 
    margin-top: 16px; 
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.beds-baths-section {
    margin-bottom: 16px;
}

.beds-baths-section + .beds-baths-section {
    border-top: 1px solid #e6e6e6;
    padding-top: 16px;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d4f5e;
}

@media (max-width: 768px) {
    .beds-baths-section {
        margin-bottom: 20px;
    }
    
    .beds-baths-section + .beds-baths-section {
        padding-top: 20px;
        margin-top: 20px;
    }
    
    .filter-section-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
}

.filter-done-btn {
    width: 100%;
    padding: 12px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.filter-done-btn:hover {
    background: #005a87;
}

.filter-done-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Status filter sections */
.status-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.status-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.status-section-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .status-section {
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .status-section-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .status-options-container {
        margin-left: 0;
    }
}
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}

.status-section-title:hover {
    color: #0073aa;
}

.status-options-container {
    margin-left: 12px;
    margin-top: 6px;
}

.status-filter-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.status-type-btn {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.status-type-btn:hover {
    border-color: #0073aa;
    color: #0073aa;
}

.status-type-btn.active {
    border-color: #0073aa;
    background: #0073aa;
    color: white;
}

.status-options-panel {
    margin-top: 12px;
}

.status-options-panel .filter-popover-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-options-panel .filter-popover-options label {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    padding: 4px 0;
}

/* Results header with sort */
.results-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.results-sort {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.results-sort > label {
    margin-bottom: 0;
}

.results-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-sort .page-info {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.results-sort label {
    font-weight: 500;
    font-size: 14px;
    color: #666;
}

.results-sort select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.amenities-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.amenities-checkboxes label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Map container: map fills area; listing cards are an absolute overlay on the left (map visible on the right) */
.listings-map-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 75vh;
    height: clamp(700px, 80vh, 1400px);
    overflow: hidden;
    clear: both;
}

/* Map fills the full container (right side visible; left is covered by overlay) */
.full-width-map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    min-height: 600px;
    z-index: 1;
    background: #f5f5f5;
    overflow: hidden;
}

/* Listing cards: absolute overlay on the left over the map */
.listings-cards-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    min-width: 400px;
    max-width: 45%;
    height: 100%;
    background: white;
    border-radius: 0;
    box-shadow: 4px 0 12px rgba(0,0,0,0.15);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: 70px;
}

/* Ensure map container starts after listings overlay */
.listings-map-container {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 75vh;
    height: clamp(700px, 80vh, 1400px);
    overflow: hidden;
    clear: both;
    margin-left: 0; /* Ensure it starts from left, but map inside is positioned right */
}

.listings-cards-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.listings-cards-scroll {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding: 15px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.listings-cards-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: white;
    flex-shrink: 0;
}

.listings-cards-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-info {
    font-size: 14px;
    font-weight: normal;
    color: #666;
}

.active-filters { margin-top: 6px; }
.active-filters .chip {
    display:inline-block; background:#eef5fb; color:#0d47a1; border:1px solid #cfe1f5; border-radius:16px;
    padding:2px 8px; margin:2px 4px; font-size:12px; cursor:pointer;
    user-select: none;
    transition: background 0.2s;
}
.active-filters .chip:hover {
    background:#dde9f5;
}
.active-filters .chip .x { 
    margin-left:6px; 
    font-weight:bold; 
    pointer-events: none;
    display: inline-block;
}

/* Back to Results / View Listings link */
.back-to-results-container {
    margin: 10px 0 20px 0;
}

.back-to-results-container a {
    color: #0073aa;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-to-results-container a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Sidebar Layout for Single Listing Pages */
#content-area.listing-with-sidebar {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px;
    align-items: flex-start;
    margin-top: 0;
    padding-top: 0;
}

.listing-main-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
    margin-top: 0;
    padding-top: 0;
    order: 1;
}

.listing-sidebar {
    width: 350px;
    flex-shrink: 0;
    margin-top: 0;
    padding-top: 0;
    order: 2;
    position: sticky;
    top: 80px; /* keep visible as main content scrolls */
    align-self: flex-start;
}

.similar-properties-sidebar {
    margin-top: 0;
    padding-top: 0;
}

/* Similar Properties Sidebar - Vertical Stack */
.similar-properties-sidebar {
    background: #fff;
    padding: 0 20px 20px 20px; /* No top padding to align with main content */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: static;
}

.similar-properties-sidebar h2 {
    font-size: 20px;
    margin: 0 0 20px 0;
    padding: 20px 0 15px 0; /* Add top padding to h2 to match main content spacing */
    border-bottom: 2px solid #0073aa;
    color: #333;
}

.similar-listings-vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.similar-listings-vertical .listing-card {
    width: 100%;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-listings-vertical .listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Responsive: Stack sidebar below on mobile */
@media (max-width: 980px) {
    #content-area.listing-with-sidebar {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .listing-main-content {
        width: 100% !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        order: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .listing-sidebar {
        width: 100% !important;
        position: static !important;
        top: auto !important;
        order: 2 !important;
        padding: 0 !important;
        margin: 20px 0 0 0 !important;
    }
    
    .similar-properties-sidebar {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 20px !important;
        margin: 0 !important;
        background: #f9f9f9 !important;
        border-top: 1px solid #ddd !important;
    }
    
    .similar-properties-sidebar h2 {
        padding: 0 0 15px 0 !important;
        margin: 0 0 20px 0 !important;
    }
    
    .listing-single-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
        margin: 0 !important;
    }
    
    .listing-single {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Container spacing for similar properties (legacy support) */
.similar-properties { margin-bottom: 24px; }

/* Single Listing Container */
.listing-single-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px; /* No top padding to align with sidebar */
    background: #fff;
}

.listing-single {
    width: 100%;
}

.listing-single .listing-featured-image {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.listing-single .listing-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.listing-single .entry-title {
    font-size: 32px;
    margin: 0 0 15px 0;
    color: #333;
}

.listing-single .listing-header-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.listing-single .listing-type-badge,
.listing-single .listing-status-badge {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.listing-single .listing-price {
    margin-bottom: 20px;
}

.listing-single .listing-price .price-amount {
    font-size: 24px;
    font-weight: 600;
    color: #0073aa;
}

.listing-single .listing-details {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.listing-single .detail-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.listing-single .detail-item {
    margin-bottom: 12px;
    line-height: 1.6;
}

.listing-single .detail-item strong {
    display: inline-block;
    min-width: 140px;
    color: #333;
    font-weight: 600;
}

.listing-single .detail-item .unit-types {
    color: #666;
}

.listing-single .listing-amenities {
    margin: 30px 0;
}

.listing-single .listing-amenities h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.listing-single .listing-amenities ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.listing-single .listing-amenities li {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 4px;
    color: #333;
}

.listing-single .listing-content {
    margin: 30px 0;
    line-height: 1.8;
    color: #555;
}

.listing-single .listing-content h2,
.listing-single .listing-content h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.listing-single .listing-content p {
    margin-bottom: 15px;
}

/* Scrollable Cards Area */
.listings-cards-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.listings-cards-scroll::-webkit-scrollbar {
    width: 8px;
}

.listings-cards-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.listings-cards-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.listings-cards-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Listing Card Styles */
.listing-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 0;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.listing-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-color: #0073aa;
}

.listing-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 4px 4px 0 0;
}

.listing-card-image-wrapper img,
.listing-card-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: high-quality;
}

.listing-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.listing-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
    display: block;
}

.listing-card-badge.listing-type-badge {
    background: rgba(0,0,0,0.85); /* Default fallback */
}
.leaflet-popup-pane .listing-type-badge, .leaflet-popup-pane .featured-badge {
    padding: 7px 10px;
}
.listing-card-badge.badge-condo {
    background: rgba(228, 199, 128, 1) !important;
}

.listing-card-badge.badge-rental {
    background: rgba(232, 105, 98, 1) !important;
}

.featured-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #FFD700;
    color: #333;
    padding: 0px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 11;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.available-units-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(110, 204, 57, 1);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 0.2px;
}

/* Top-left icon badges container (when icons enabled) */
.listing-card-top-left-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    z-index: 12;
}

/* Individual icon badges */
.listing-card-top-left-icons .badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.listing-card-top-left-icons .badge-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.listing-card-top-left-icons .badge-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Specific badge colors/backgrounds */
.listing-card-top-left-icons .badge-featured {
    background: rgba(255, 215, 0, 0.95);
}

.listing-card-top-left-icons .badge-condo {
    background: rgba(228, 199, 128, 0.95);
}

.listing-card-top-left-icons .badge-rental {
    background: rgba(232, 105, 98, 0.95);
}

.listing-card-top-left-icons .badge-verified {
    background: rgba(255, 255, 255, 0.95);
}

.listing-card-top-left-icons .badge-accessible {
    background: rgba(33, 150, 243, 0.95);
}

.listing-card-top-left-icons .badge-income-based {
    background: rgba(76, 175, 80, 0.95);
}

.listing-card-top-left-icons .badge-age-restricted {
    background: rgba(255, 152, 0, 0.95);
}

.listing-card-top-left-icons .badge-champ {
    background: rgba(156, 39, 176, 0.95);
}

.badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-icon svg {
    width: 16px;
    height: 16px;
}

.listing-card-content {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 60px;
    overflow: visible;
}

.listing-card-content > * {
    display: block;
    visibility: visible !important;
    opacity: 1 !important;
}

.listing-card-title {
    display: block !important;
    visibility: visible !important;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
    color: #333;
    line-height: 1.3;
}

.maloney-featured-listings-block {
    background: white;
    padding: 0;
    margin: 40px 0;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
}

.featured-listings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.featured-listings-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #2f7b9b;
}

.featured-listings-description {
    margin: 8px 0 0;
    color: #2d4f5e;
    max-width: 640px;
    line-height: 1.5;
}

.featured-listings-all-link {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #2d4f5e;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.featured-listings-grid {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0 20px;
}

.featured-listings-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-top: 28px;
}

.featured-listings-slider-wrapper {
    position: relative;
    padding: 0 40px;
}

.featured-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    z-index: 2;
}

.featured-slider-nav.prev {
    left: -23px;
}

.featured-slider-nav.next {
    right: -23px;
}

.featured-slider-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.featured-slider-nav .dashicons {
    font-size: 18px;
}

.featured-listings-grid.featured-listings-slider {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 10px 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    touch-action: pan-x;
}

.featured-listings-grid.featured-listings-slider::-webkit-scrollbar {
    display: none;
}

.featured-listings-grid.featured-listings-slider {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.featured-listings-grid.featured-listings-slider .featured-listing-card {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.featured-listing-card {
    background: #fafafa;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    flex: 0 0 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
    min-width: 280px;
}

/* Ensure 3-column grid on desktop (gap is 20px, so we need to account for 2 gaps across 3 items = 13.33px per item) */
@media (min-width: 1024px) {
    .featured-listings-grid:not(.featured-listings-slider) .featured-listing-card {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

.featured-listing-card-media {
    position: relative;
    min-height: 200px;
    overflow: hidden;
}

.featured-listing-card-media img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.featured-listing-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.featured-listing-card-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.featured-listing-card-title a {
    color: #111;
    text-decoration: none;
}

.featured-listing-card-address {
    margin: 0;
    color: #5a5a5a;
    font-size: 14px;
    line-height: 1.4;
}

.featured-listing-card-price {
    font-size: 20px;
    font-weight: 600;
    color: #1f7c95;
}

.featured-listing-card-status {
    font-size: 13px;
    color: #4e4e4e;
    letter-spacing: 0.1px;
    text-transform: uppercase;
}

.featured-listing-meta {
    margin-top: auto;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.featured-listing-card-footer {
    padding-top: 12px;
}

.featured-view-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid #0073aa;
    color: #0073aa;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.featured-view-apply-btn:hover {
    background: #0073aa;
    color: white;
}
.featured-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #444;
    letter-spacing: 0.02em;
}

.featured-meta-icon {
    display: inline-flex;
    color: #444;
}

.featured-meta-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.featured-listing-card-availability {
    font-size: 13px;
    color: #4e4e4e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 768px) {
    .maloney-featured-listings-block {
        padding: 0;
        margin: 30px 0;
    }

    .featured-listings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 0;
    }

    .featured-listings-header-content {
        width: 100%;
    }

    .featured-listings-title {
        font-size: 24px;
        line-height: 1.2;
    }

    .featured-listings-description {
        font-size: 14px;
        margin-top: 8px;
    }

    .featured-listings-all-link {
        font-size: 13px;
        align-self: flex-start;
    }

    .featured-listings-grid {
        margin-top: 20px;
        gap: 16px;
        justify-content: flex-start;
        padding: 0 16px;
    }

    .featured-listing-card {
        flex: 0 0 calc(100% - 8px);
        max-width: calc(100% - 8px);
        min-width: 0;
    }

    .featured-listings-grid.featured-listings-slider .featured-listing-card {
        flex: 0 0 calc(85vw - 32px);
        max-width: calc(85vw - 32px);
        min-width: 280px;
    }

    .featured-listings-slider-wrapper {
        margin: 0;
        padding: 0;
    }

    .featured-listings-grid.featured-listings-slider {
        padding: 0 0 10px 0;
    }

    .featured-slider-nav {
        width: 40px;
        height: 40px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .featured-slider-nav.prev {
        left: -20px;
    }

    .featured-slider-nav.next {
        right: -20px;
    }

    .featured-slider-nav .dashicons {
        font-size: 16px;
    }

    .featured-listing-card-media {
        min-height: 180px;
    }

    .featured-listing-card-media img {
        height: 180px;
    }

    .featured-listing-card-body {
        padding: 16px;
        gap: 6px;
    }

    .featured-listing-card-title {
        font-size: 16px;
    }

    .featured-listing-card-address {
        font-size: 12px;
    }

    .featured-listing-card-price {
        font-size: 18px;
    }

    .featured-listing-card-status,
    .featured-listing-card-availability {
        font-size: 12px;
    }

    .featured-listing-card-footer {
        padding-top: 10px;
    }

    .listing-card-cta-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
    }
}

.listing-card-address {
    display: block !important;
    visibility: visible !important;
}

.listing-card-features {
    display: flex !important;
    visibility: visible !important;
}

.waitlist-status {
    display: block !important;
    visibility: visible !important;
}

.listing-card-title a {
    color: #333;
    text-decoration: none;
}

.listing-card-title a:hover {
    color: #0073aa;
}

.listing-card-address {
    color: #666;
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 1.3;
}

/* View & Apply CTA Button */
.listing-card-cta-btn {
    display: block;
    background: #0073aa;
    color: white;
    text-align: center;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: background 0.2s;
}

.listing-card-cta-btn:hover {
    background: #005a87;
    color: white;
}

.listing-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.feature-tag {
    background: #e9eef2;
    color: #345;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
    margin-right: 4px;
    margin-bottom: 4px;
}
.badge-lottery { background: #E8F5E9; color: #2E7D32; }
.badge-firstcome { background: #E3F2FD; color: #1565C0; }
.badge-available { background: #E8F5E9; color: #2E7D32; }
.badge-waitlist { background: #FFF3E0; color: #EF6C00; }
.badge-waitlist-open { background: #FFFDE7; color: #827717; }

.waitlist-status {
    margin: 4px 0 0 0;
    padding: 0;
    border-top: 1px solid #e0e0e0;
    font-size: 11px;
}

.waitlist-status.available {
    color: #2e7d32;
}

.waitlist-status.waitlist {
    color: #1976d2;
}

.waitlist-status.not-available {
    color: #666;
}

.waitlist-status strong {
    display: block;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.available-units {
    margin-top: 4px;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.available-units strong {
    font-weight: 600;
    color: #333;
}

.unit-types {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.3;
    color: #666;
}

.available-units-offered {
    margin-top: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.4;
}

.available-units-offered strong {
    font-weight: 600;
    color: #333;
}

.unit-type {
    display: inline;
    color: #555;
}

.wheelchair-icon {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 2px;
}

.listing-card-price {
    font-size: 18px;
    font-weight: bold;
    color: #2e7d32;
    margin: 12px 0;
}

.listing-card-button {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: auto; /* Push button to bottom */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
    text-align: center;
}

.listing-card-button:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.listing-card-button svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Pagination */
.listings-pagination {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
    flex-shrink: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    grid-column: span 2;
}


.listings-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    min-width: 32px;
    height: 32px;
    text-align: center;
    transition: all 0.2s ease;
    background: #f5f5f5;
    border-color: #ddd;
}

.listings-pagination .page-numbers:hover {
    background: #e9e9e9;
    border-color: #bbb;
    color: #333;
}

.listings-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
    font-weight: 500;
}

.listings-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
    min-width: auto;
    padding: 0 4px;
    color: #333;
}

.listings-pagination .page-numbers.dots:hover {
    background: transparent;
    border: none;
    color: #333;
}

.listings-pagination .page-numbers.prev,
.listings-pagination .page-numbers.next {
    padding: 6px 10px;
    background: #f5f5f5;
}

/* No Listings */
/* Loading Spinner */
.loading {
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 300px;
    background: #fafafa;
    border-radius: 8px;
    margin: 20px 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e8e8e8;
    border-top: 5px solid #0073aa;
    border-right: 5px solid #0073aa;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.2);
}

.loading-text {
    font-size: 16px;
    color: #555;
    font-weight: 500;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile adjustments for loading spinner */
@media (max-width: 768px) {
    .loading {
        padding: 40px 15px;
        min-height: 200px;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    
    .loading-text {
        font-size: 14px;
    }
}

.no-listings-found {
    padding: 60px 20px;
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
}

.no-listings-found p {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.no-listings-found .reset-filters-link {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s ease;
    margin-top: 10px;
}

.no-listings-found .reset-filters-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Map Popup Styles */
/* Map Popup Styles - Caritas-style design */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    border: none !important;
    z-index: 10000 !important; /* Ensure popup appears above left section */
}

.leaflet-popup {
    z-index: 10000 !important; /* Ensure popup appears above left section */
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    min-width: 320px;
}

.leaflet-popup-tip {
    background: white !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.leaflet-popup-close-button {
    display: none !important;
}

.map-popup-custom {
    width: 320px;
    max-width: 90vw;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

.map-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background 0.2s;
}

.map-popup-close:hover {
    background: rgba(0,0,0,0.8);
}

.map-popup {
    min-width: 200px;
}

.map-popup .status-badge {
    display: inline-block;
    background: #E3F2FD;
    color: #0D47A1;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin: 4px 0;
}

.map-popup h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.map-popup h3 a {
    color: #0073aa;
    text-decoration: none;
}

.map-popup p {
    margin: 5px 0;
    font-size: 14px;
}

.map-popup .button {
    display: inline-block;
    padding: 8px 15px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

/* Filter Modal Button (Mobile) */
.filter-modal-btn {
    display: none; /* Hidden on desktop */
    padding: 0 16px;
    background: white;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    height: 44px; /* Match input and search button height */
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s;
}

.filter-modal-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.filter-modal-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

@media (max-width: 768px) {
    .filter-modal-btn {
        display: inline-flex;
    }
    
    .listings-search-container {
        gap: 10px; /* Spacing between search group and filter button */
        align-items: stretch; /* Make all items same height */
    }
    
    .search-location {
        flex: 1;
        min-width: 0;
    }
}

.filter-modal-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.filter-modal-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

/* Filter Modal Overlay */
.filter-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile Chrome */
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999 !important; /* Much higher than all sticky headers */
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.filter-modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.filter-modal-content {
    background: white;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height for mobile Chrome */
    max-width: 100vw !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    /* Account for safe area insets on mobile */
    padding-top: env(safe-area-inset-top, 0);
    padding-right: env(safe-area-inset-right, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
}

@media (max-width: 768px) {
    .filter-modal-overlay {
        align-items: stretch;
        justify-content: stretch;
    }
    
    .filter-modal-content {
        border-radius: 0;
    }
}

.filter-modal-header {
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top, 0));
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: white;
    gap: 10px;
    position: relative;
    z-index: 1;
}

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

.filter-modal-header-btn {
    display: none; /* Hidden on desktop */
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .filter-modal-header-btn {
        display: inline-flex;
        align-items: center;
        min-height: 44px; /* Better touch target */
        padding: 10px 16px;
    }
    
    .filter-modal-header {
        flex-wrap: wrap;
        padding: 12px 16px;
    }
    
    .filter-modal-header h2 {
        font-size: 18px;
        flex: 1 1 100%;
        margin-bottom: 12px;
    }
    
    .filter-modal-header-actions {
        flex: 1 1 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        position: relative;
    }
    
    .filter-modal-header-actions .filter-modal-header-btn {
        flex: 0 0 auto;
    }
    
    .filter-modal-close {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
        margin-left: auto;
    }
}

.filter-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-modal-header .dashicons {
    font-size: 18px;
    color: #666;
}

.filter-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-modal-close:hover {
    background: #f5f5f5;
}

.filter-modal-close .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.filter-modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
    min-height: 0; /* Allow flex child to shrink */
}

@media (max-width: 768px) {
    .filter-modal-body {
        padding: 16px;
    }
}

.filter-modal-body .filter-dropdowns {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.filter-modal-body .filter-dropdowns {
    display: block !important;
}

.filter-modal-body .filter-btn {
    display: none !important; /* Hide filter buttons in modal */
}

.filter-modal-body #toggle_advanced_filters {
    display: none !important; /* Specifically hide "More" button in modal */
}

.filter-modal-body .filter-popover {
    position: relative !important;
    display: block !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 0 !important;
    min-width: auto !important;
    max-width: 100% !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .filter-modal-body .filter-popover {
        padding: 16px !important;
        margin-bottom: 16px !important;
        border-radius: 6px !important;
    }
}

.filter-modal-body .filter-popover-content {
    padding: 0 !important;
}

.filter-modal-body .filter-popover-header {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.filter-modal-body .filter-popover-header-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #111 !important;
}

@media (max-width: 768px) {
    .filter-modal-body .filter-popover-header {
        margin-bottom: 12px !important;
        padding-bottom: 10px !important;
    }
    
    .filter-modal-body .filter-popover-header-title {
        font-size: 15px !important;
    }
}

.filter-modal-body .advanced-filters {
    display: block !important;
    position: relative !important;
    margin: 20px 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    order: 999; /* Ensure it appears after all popovers */
}

@media (max-width: 768px) {
    .filter-modal-body .advanced-filters {
        padding: 16px !important;
        margin: 16px 0 0 0 !important;
        border-radius: 6px !important;
    }
    
    .filter-modal-body .filter-group label {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .filter-modal-body .amenities-checkboxes label,
    .filter-modal-body .accessibility-checkboxes label,
    .filter-modal-body .other-filters label {
        font-size: 15px;
        padding: 8px 0;
        min-height: 44px; /* Better touch target */
        display: flex;
        align-items: center;
    }
    
    .filter-modal-body .amenities-checkboxes input,
    .filter-modal-body .accessibility-checkboxes input,
    .filter-modal-body .other-filters input {
        width: 20px;
        height: 20px;
        margin-right: 12px;
        flex-shrink: 0;
    }
}

.filter-modal-body .advanced-filters-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
}

.filter-modal-body .status-type-btn {
    width: 100% !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
}

.filter-modal-body .status-options-panel {
    display: none;
    margin-top: 12px !important;
}

.filter-modal-body .status-options-panel[style*="display: block"] {
    display: block !important;
}

.filter-modal-body #status_panel_rental,
.filter-modal-body #status_panel_condo {
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid #e0e0e0 !important;
}

.filter-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    background: white;
}

@media (max-width: 768px) {
    .filter-modal-footer {
        padding: 12px 16px;
        gap: 10px;
    }
}

.filter-modal-reset-btn,
.filter-modal-apply-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    min-height: 48px; /* Better touch target */
}

@media (max-width: 768px) {
    .filter-modal-reset-btn,
    .filter-modal-apply-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 50px;
    }
}

.filter-modal-reset-btn {
    background: white;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.filter-modal-reset-btn:hover {
    background: #f0f7fa;
}

.filter-modal-apply-btn {
    background: #0073aa;
    color: white;
}

.filter-modal-apply-btn:hover {
    background: #005a87;
}

/* Desktop: Hide modal button, show inline filters */
@media (min-width: 769px) {
    .filter-modal-btn {
        display: none !important;
    }
    
    .filter-modal-overlay {
        display: none !important;
    }
}

/* Mobile: Show modal button, hide inline filters */
@media (max-width: 768px) {
    .filter-modal-btn {
        display: inline-flex !important;
    }
    
    .filter-dropdowns {
        display: none !important;
    }

    body.maloney-listings-active .listings-search-container > .filter-dropdowns,
    body.maloney-listings-active .listings-search-container > #advanced_filters {
        display: none !important;
    }
    
    .filter-modal-overlay {
        align-items: flex-end;
    }
    
    .filter-modal-content {
        max-height: 100vh;
    }

    .filter-modal-header-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .filter-modal-close {
        margin-left: auto;
    }
}

/* Mobile View Toggle */
.mobile-view-toggle {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #ddd;
    justify-content: center;
    z-index: 2200;
    position: relative;
}

@media (max-width: 768px) {
    .mobile-view-toggle {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
}

.view-toggle-btn {
    flex: 1;
    max-width: 150px;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.view-toggle-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.view-toggle-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Show mobile toggle on mobile */
    .mobile-view-toggle {
        display: flex !important;
    }
    
    /* Default: Show list view by default on mobile, hide when map is active */
    .listings-cards-overlay {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
        z-index: 1 !important;
        flex-direction: column !important;
    }
    
    /* When list view is explicitly active, ensure it's shown */
    .listings-cards-overlay.mobile-list-active {
        display: flex !important;
        position: relative !important;
    }
    
    /* Hide list when map view is active */
    .listings-cards-overlay.mobile-list-hidden {
        display: none !important;
    }
    
    .listings-cards-scroll {
        overflow-y: visible !important;
        padding: 15px !important;
        max-height: none !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
    
    #listings-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Map container - always visible, contains both map and listings */
    .listings-map-container {
        position: relative !important;
        width: 100% !important;
        display: block !important;
    }
    
    /* Hide the map itself when in list view */
    .listings-map-container:not(.mobile-map-active) .full-width-map {
        display: none !important;
    }
    
    /* Show the map when map view is active */
    .listings-map-container.mobile-map-active .full-width-map {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: calc(100vh - 180px) !important;
        min-height: 400px !important;
    }
    
    .listings-cards-scroll {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    
    .listings-map-layout {
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .listings-cards-overlay {
        flex: 1 1 auto !important;
    }
    
    .listings-pagination {
        grid-column: span 1 !important;
    }
    
    .search-location {
        flex: 1;
        min-width: 0;
    }
    
    .filter-dropdowns {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-dropdowns select,
    .filter-btn {
        width: 100%;
    }
    
    /* Advanced filters (More container) - mobile responsive */
    .advanced-filters {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
        left: auto !important;
        right: auto !important;
        position: relative !important; /* Part of page flow */
        top: auto !important;
        bottom: auto !important;
        max-height: none !important;
        border-radius: 4px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        z-index: 1 !important;
        margin-top: 10px !important;
    }
    
    /* Compact popovers become full-width panels on small screens */
    .filter-dropdowns { position: static; }
    .filter-popover {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin-top: 8px !important;
        box-sizing: border-box;
    }
    
    /* Advanced filters grid - single column on mobile */
    .advanced-filters-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 16px !important;
    }
    
    .advanced-filters-grid .filter-group:first-child {
        grid-column: 1 !important;
    }
    
    .advanced-filters-grid .filter-group:last-child {
        grid-column: 1 !important;
    }
}

/* Mobile-first fixes for filters and advanced filters */
@media (max-width: 768px) {
    /* Avoid floating overlays; keep single scroll */
    .listings-map-layout {
        height: auto !important;
        min-height: 100vh;
    }

    /* More (advanced) dropdown as full-width panel */
    .advanced-filters {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
        background: #fff !important;
        padding: 16px !important;
        border-radius: 4px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        z-index: 1 !important;
        margin-top: 10px !important;
    }

    .filter-dropdowns {
        width: 100% !important;
        gap: 10px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .filter-popover {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        box-sizing: border-box;
        flex-basis: 100% !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .filter-popover-content {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        padding: 12px;
        border-radius: 6px;
        background: #fff;
    }

    .advanced-filters-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .search-location input[type="text"] {
        width: 100% !important;
    }
}

@media (min-width: 769px) {
    /* Hide mobile toggle on desktop */
    .mobile-view-toggle {
        display: none !important;
    }
    
    /* Always show both on desktop */
    .listings-cards-overlay {
        display: block !important;
    }
    
    .listings-map-container {
        display: block !important;
    }
}

/* Tablet-specific adjustments (landscape/portrait) */
@media (min-width: 769px) and (max-width: 1024px)  {
    /* Keep advanced filters as a dropdown, not a full overlay */
    .advanced-filters {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        left: 0 !important;
        right: auto !important;
        width: auto !important;
        max-width: 520px !important;
        max-height: 70vh !important;
        padding: 16px !important;
        border-radius: 6px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
        margin-top: 0 !important;
        background: #fff !important;
    }

    .filter-dropdowns {
        flex-wrap: wrap;
        gap: 10px;
    }

    .search-location {
        flex: 1 1 360px;
        min-width: 300px;
    }

    .search-location input[type="text"] {
        width: 100% !important;
        min-width: 0 !important;
        height: 44px;
        line-height: 44px;
    }

    #search_location_btn {
        height: 44px;
        min-width: 44px;
    }

    .listings-cards-overlay {
        max-width: 48%;
        min-width: 380px;
    }

    /* Let the layout breathe on tablets to avoid content being clipped */
    .listings-map-layout {
        display: block !important;
        overflow: visible !important;
        flex-direction: initial !important;
    }
}
@media (min-width: 1025px) and (max-width: 1280px) {
    .search-location {
        flex: 1 1 360px;
        min-width: 300px;
    }
    .listings-map-layout {
        display: block !important;
        overflow: visible !important;
        flex-direction: initial !important;
    }
}

/* Custom Map Marker Icons */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
}

.custom-marker-icon div {
    position: relative;
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Ensure marker cluster icons don't interfere */
.leaflet-marker-icon {
    background: transparent !important;
}

/* Search Visible Area Button */
.search-visible-area-control {
    margin-top: 10px;
    margin-right: 10px;
    z-index: 1000;
    position: relative;
    pointer-events: auto;
}

.search-visible-area-btn {
    background: #0073aa;
    color: white !important;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
    pointer-events: auto;
    z-index: 1001;
    position: relative;
    display: block;
    width: 100%;
}

.search-visible-area-btn:hover {
    background: #005a87;
    color: white !important;
}

.search-visible-area-btn:disabled {
    background: #999;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.search-visible-area-btn:active {
    color: white !important;
}

/* Active filter tag */
.active-filter-tag {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 5px 5px 0 0;
}

/* Map Legend */
.map-legend {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 12px;
}

.map-legend-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-legend-title {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 13px;
    color: #333;
}

.map-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-pin {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.legend-pin-condo {
    background-color: #E4C780;
}

.legend-pin-rental {
    background-color: #E86962;
}

/* Inline legend for top-right placement */
.inline-legend {
    box-shadow: none;
    background: rgba(255,255,255,0.9);
    padding: 8px 10px;
}

.map-legend-content.inline {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.map-legend-title {
    margin: 0;
}

/* Arrange legend and zoom side by side in the top-right */
.leaflet-top.leaflet-right {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    padding-right: 8px;
    padding-top: 8px;
}

.leaflet-top.leaflet-right .leaflet-control-zoom {
    order: 2;
}

.leaflet-top.leaflet-right .map-legend {
    order: 1;
}

.legend-label {
    color: #333;
    font-size: 12px;
}

/* Marker Cluster Styling */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    z-index: 1000 !important;
    visibility: visible !important;
    display: block !important;
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57) !important;
    z-index: 1000 !important;
    visibility: visible !important;
}

.marker-cluster-medium div {
    background-color: rgba(110, 204, 57) !important;
    z-index: 1000 !important;
    visibility: visible !important;
}

.marker-cluster-large div {
    background-color: #78c453 !important;
    z-index: 1000 !important;
    visibility: visible !important;
}

/* Active listing card state */
.listing-card.active {
    border: 2px solid #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

/* Active marker state */
.marker-active {
    z-index: 1000 !important;
}

.marker-active div,
.marker-active-inner {
    transform: scale(1.3) rotate(-45deg) !important;
    box-shadow: 0 0 0 4px rgba(0, 115, 170, 0.4), 0 0 0 6px rgba(255, 255, 255, 0.8) !important;
    border: 3px solid #0073aa !important;
    border-width: 4px !important;
}

/* Listing card options/more info */
.listing-card-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.listing-card-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.listing-card-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    opacity: 0.7;
    flex-shrink: 0;
}

/* Single Listing Map - Links Control */
.single-map-links-control {
    margin-top: 10px;
    margin-right: 10px;
    display: flex;
    flex-direction: row; /* Side by side */
    gap: 8px;
    z-index: 1000;
    position: relative;
    pointer-events: auto;
}

.single-map-link-btn {
    display: inline-block;
    background: #0073aa;
    color: white !important;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.2s;
    white-space: nowrap;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1001;
    position: relative;
    border: none;
}

.single-map-link-btn:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none;
}

.single-map-link-btn:visited {
    color: white !important;
}

.single-map-link-btn:active {
    color: white !important;
}

/* Single listing map container */
#listing-single-map {
    cursor: default !important;
}

#listing-single-map.leaflet-container {
    cursor: default !important;
}

/* Available Units Heading */
.available-heading {
    color: rgba(255, 255, 255, 1) !important;
    text-align: center;
    background-color: rgba(47, 123, 155, 1) !important;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
    padding: 16px 20px 16px 20px !important;
    text-transform: uppercase !important;
}

/* Availability Table Styling */
.maloney-availability-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 4px;
    overflow: hidden;
}

/* # Beds column - no padding for tbody td */
.maloney-availability-table tbody td.availability-beds {
    padding: 0 !important;
    text-align: left;
}

/* Middle 4 columns - center aligned */
.maloney-availability-table tbody td:nth-child(2),
.maloney-availability-table tbody td:nth-child(3),
.maloney-availability-table tbody td:nth-child(4),
.maloney-availability-table tbody td:nth-child(5) {
    text-align: center;
}

/* Accessible Units - left aligned, 14px font */
.maloney-availability-table tbody td.availability-accessible {
    font-size: 14px;
    text-align: left;
}

/* Mobile: Stack tables vertically, each row becomes its own card with two-column layout */
@media (max-width: 768px) {
    .maloney-listing-availability-block {
        padding: 0 !important;
        margin: 20px 0 !important;
    }
    
    .maloney-availability-table {
        display: block;
        width: 100%;
        border: none;
        background: transparent;
    }
    
    .maloney-availability-table thead {
        display: none;
    }
    
    .maloney-availability-table tbody {
        display: block;
    }
    
    /* Alternate row background colors */
    .maloney-availability-table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        padding: 15px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #ffffff;
    }
    
    .maloney-availability-table tbody tr:nth-child(even) {
        background: #f9f9f9;
    }
    
    .maloney-availability-table tbody tr:last-child {
        margin-bottom: 0;
    }
    
    /* # Beds as heading */
    .maloney-availability-table tbody td.availability-beds {
        display: block;
        font-weight: 600;
        font-size: 16px;
        padding: 0 0 12px 0 !important;
        margin-bottom: 12px;
        border-bottom: 1px solid #eee;
        text-align: left;
    }
    
    /* All other cells as label:value pairs using grid for better alignment */
    .maloney-availability-table tbody td:not(.availability-beds) {
        display: grid;
        grid-template-columns: 160px 1fr;
        gap: 10px;
        padding: 8px 0 !important;
        border: none;
        font-size: 14px;
        align-items: start;
    }
    
    .maloney-availability-table tbody td:not(.availability-beds)::before {
        content: attr(data-label);
        font-weight: 600;
        color: #333;
        text-align: left;
        background-color: #f0f0f0;
        padding: 6px 10px;
        border-radius: 3px;
    }
    
    /* Center align values for middle 4 columns */
    .maloney-availability-table tbody td:nth-child(2) .availability-value,
    .maloney-availability-table tbody td:nth-child(3) .availability-value,
    .maloney-availability-table tbody td:nth-child(4) .availability-value,
    .maloney-availability-table tbody td:nth-child(5) .availability-value {
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Accessible units - left aligned, 14px font */
    .maloney-availability-table tbody td.availability-accessible {
        font-size: 14px !important;
    }
    
    .maloney-availability-table tbody td.availability-accessible .availability-value {
        text-align: left !important;
        display: flex;
        align-items: flex-start;
    }
}
