/* Sliding background for active tab */
.bim-tabs-slider-group {
    position: relative;
    display: flex;
    align-items: center;
}
.bim-tab-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #221551;
    border-radius: 50px;
    z-index: 0;
    transition: left 0.3s cubic-bezier(.4,0,.2,1), width 0.3s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.bim-tabs-slider-group .bim-tab-button {
    position: relative;
    z-index: 1;
}
/* Brohn Interactive Map Styles */
.brohn-interactive-map {
    /* Container for the whole map interface */
    font-family: sans-serif; /* Example font */
}
.home-item-community-fp-info {
}
.bim-filters-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 10px;
    align-items: center;
    margin-bottom: 15px;
}
#bim-map-canvas .gm-style-iw-tc::after {
    background: #ffffff !important;
}
.bim-search-bar {
    flex-grow: 1;
        max-width: 475px;
}
#bim-main-search {
    width: 100%;
    padding: 21px 60px 21px 20px;
    border: 1px solid #707070;
    border-radius: 60px;
    box-sizing: border-box;
    background-color: #fff;
    background-image: url(../svg/search.svg);
    background-repeat: no-repeat;
    background-position: right 20px center;
}

.bim-filters-dropdowns {
    display: flex;
    gap: 40px;
}

.bim-filter-dropdown {
    position: relative;
}

.bim-filter-button {
    padding: 10px 0;
    background-color: #fff;
    border: 0;
    border-bottom: 1px solid #707070;
    border-radius: 0;
    cursor: pointer;
    min-width: 80px;
    width: 144px;
    max-width: 100%;
    text-align: left;
    color:#000000;
}
.bim-filter-button .bim-arrow {
    float: right;
    margin-left: 5px;
    background-image: url(../svg/right-ui.svg);
    font-size: 0;
    background-repeat: no-repeat;
    height: 17px;
    width: 9px;
    background-size: contain;
}


#bim-all-filters-btn {
    background-color: #ffffff;
    color: #4E535B;
    border-radius: 0;
    border: 0;
    font-weight: bold;
    display: flex;
    justify-content: center;
}
#bim-all-filters-btn .dashicons {
    vertical-align: middle;
    margin-right: 15px;
}


.bim-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 250px; /* Wider for sliders */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    padding: 12px 16px;
    z-index: 100;
    border: 1px solid #ddd;
    border-top: none;
}
.bim-dropdown-content.bim-show {
    display: block;
}
.bim-dropdown-content .bim-slider-values { /* This was for noUiSlider, might not be used for native */
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    width: 100%;
    padding: 8px;
    margin-bottom: 4px;
    text-align: left;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    cursor: pointer; /* If it was clickable */
}
.bim-dropdown-content .bim-native-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bim-dropdown-content .bim-native-slider-container label {
    font-size: 0.9em; color: #555;
}
.bim-dropdown-content .bim-native-slider-container input[type="range"] {
    width: 100%;
}
a.bim-clickable-link.home-item-view-community-link {
    font-size: 12px;
    padding-left: 10px;
    text-decoration: none;
}
a.bim-clickable-link.home-item-more-info-btn {
    font-size: 12px;
    text-decoration: none;
}
a.bim-clickable-link.home-item-more-info-btn .dashicons, a.bim-clickable-link.home-item-view-community-link .dashicons {
    font-size: 16px;
}
.bim-modal-filter-section .bim-native-slider-container input[type="range"]::-webkit-slider-thumb, .bim-dropdown-content .bim-native-slider-container input[type="range"]::-webkit-slider-thumb {
    width: 15px;
    -webkit-appearance: none;
    height: 15px;
    cursor: ew-resize;
    background: #28B8B0;
    border-radius: 50%;
}
.bim-button-group button {
    display: block;
    width: 100%;
    padding: 8px;
    /* Styles for non-active buttons, adjust as per your theme */
    margin-bottom: 4px;
    text-align: left;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    cursor: pointer;
    color:black;
}
.bim-button-group button.active {
    background-color: #28B8B0;
    color: white;
    border-color: #28B8B0;
}
.bim-button-group button:hover:not(.active) {
    background-color: #e0e0e0;
}

.bim-tabs {
    background: #28B8B0;
    padding: 2.5em 1em 1.5em;
    margin: 0 15px;
    border-radius: 8px 8px 0 0;
}
.bim-tabs-inner {
    display: flex;
    background: #fff;
    border-radius: 50px;
}
.bim-tab-button {
    flex-grow: 1;
    padding: 12px 15px;
    border: none;
    border-bottom: 0;
    background-color: transparent;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    flex-direction: row-reverse;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    color: #3E4249;
	    font-weight: bold;
	    transition: all 300ms ease-in-out;
}
.bim-tab-button.active {
    font-weight: bold;
    background-color: transparent;
    color: #ffffff;
	pointer-events: none;
}
.bim-tab-button:hover {
    opacity: .95;
}
.bim-tab-button.active:hover {
    opacity: 1;
}
.bim-tab-button .bim-tab-title { display: block; }
div#bim-results-list::before {
    content: 'Search By:';
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    position: absolute;
    right: 0;
    top: 13px;
    left: 30px;
    letter-spacing: .5px;
    color: #fff;
}
.bim-tab-button:first-child {
    border-radius: 50px 0 0 50px;
}
.bim-tab-button:last-child {
    border-radius: 0 50px 50px 0;
}

.bim-map-list-wrapper {
    display: flex;
    height: 600px; /* Adjust as needed */
}

#bim-map-canvas {
    width: 100%; /* Will be controlled by flex parent */
    height: 100%;
    background-color: #eee; /* Placeholder bg */
}

#bim-results-list {
    flex: 0 0 40%; /* List takes 40% width */
    min-width: 650px; /* Minimum width for the list on desktop */
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative; /* Needed for absolute positioning of loader */
    border-left: 1px solid #ddd;
    transition: opacity 0.3s ease-in-out; /* Add transition for fade effect */
}
.bim-list-header {
    padding: 10px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-weight: bold;
     z-index: 1; /* Ensure header is above loader if loader is absolute */
    position: relative; /* Needed for z-index to work */
}
#bim-results-count-display {
    float: right;
    font-size: 0.9em;
    color: #777;
}
/* State when results list is loading */
#bim-results-list.bim-loading {
    opacity: 0.5; /* Fade out the list content */
}
#bim-list-content {
    overflow-y: auto;
    flex-grow: 1;
    padding: 10px; /* Added some padding around all list items */
    position: relative;
}
/* Loader: centralized */
#bim-results-list .bim-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
    display: none; /* Hidden by default, controlled by JS showLoader */
    align-items: center; /* For centering text if using flex */
    justify-content: center; /* For centering text if using flex */
    text-align: center;
    padding: 20px; /* For standalone text */
    font-style: italic;
    color: #777;
}
/* Ensure loader text is vertically centered if its display becomes flex */
#bim-results-list .bim-loader[style*="display: block;"] { /* More specific if JS sets display:block */
    display: flex !important; /* Override inline style if needed for flex centering */
}


.bim-no-results {
    text-align: center;
    padding: 20px;
    color: #777;
}

/* --- Home List Item NEW STYLES --- */
.bim-list-item.home-item {
    display: flex;
    flex-direction: row;
    border: 1px solid #fefefe;
    margin-bottom: 15px;
    background-color: #fff;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.bim-list-item.home-item .home-item-image-container {
    flex: 0 0 40%;
    max-width: 300px; /* Adjust as per your design's image proportions */
    position: relative;
    overflow: hidden;
}

.bim-list-item.home-item .home-item-image-container img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bim-list-item.home-item .home-item-status { 
    position: absolute;
    top: 0;
    right: 10px;
    left: auto;
    background-color: #F5A800;
    color: #ffffff;
    padding: 6px 10px;
    font-size: 0.80em;
    font-weight: bold;
    z-index: 2;
    text-align: center;
}
.bim-list-item.home-item .home-item-status-sold { 
    background-color: #E4E1DC;
    color: #333;
}

.bim-list-item.home-item .home-item-content-container {
    flex-grow: 1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.bim-list-item.home-item .home-item-special-banner { /* e.g., "Home Of The Week" */
    background-color: #211451;
    color: white;
    padding: 6px 10px;
    font-size: 0.80em;
    font-weight: bold;
    position: absolute;
    top: 0;
    right: 0;
}
.bim-list-item.home-item .home-item-details {
    padding: 0 10px !important;
}

.bim-list-item.home-item .home-item-details .home-item-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-left: 5px; /* If you bring this back */
}



.bim-list-item.home-item .home-item-details .home-item-citystate a.bim-clickable-link {
    color: #28b8b0;
    text-decoration: none;
    position: relative;
    z-index: 5;
    font-size: .9em;
    margin-left: 5px;
}
.bim-list-item.home-item .home-item-details .home-item-citystate a.bim-clickable-link:hover {
    text-decoration: underline;
}


.bim-list-item.home-item .home-item-stats div {
    text-align: center;
    font-size: 0.85em;
    text-transform: uppercase; /* BED, BATH, STORY, SQ.FT. are uppercase */
}
.bim-list-item.home-item .home-item-stats div span { /* The number */
    display: block;
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
    text-transform: none; /* Numbers are not uppercase */
}

.bim-list-item.home-item .home-item-community-fp-info {
    margin-top: auto;
    font-size: .65em;
    padding: 0 0 0 10px;
    font-weight: bold;
    line-height: 1.5em;
}
.bim-list-item.home-item .home-item-community-fp-info .info-line {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically align items in the line */
    margin-bottom: 0;
}
.bim-list-item.home-item .home-item-community-fp-info .info-label {
    color: #555;
    margin-right: 5px;
    font-weight: bold; 
}
.bim-list-item.home-item .home-item-community-fp-info .info-value {
    color: #333;
    font-weight: 500; /* Slightly bolder value */
}
.bim-list-item.home-item .home-item-community-fp-info a.bim-clickable-link {
    text-decoration: none !important;
    font-size: 0.95em;
    z-index: 5;
    font-weight: 500;
}
.bim-list-item.home-item .home-item-community-fp-info a.bim-clickable-link:hover {
    text-decoration: underline;
}
.bim-list-item.home-item .home-item-community-fp-info a.bim-clickable-link .dashicons {
    font-size: 1.5em;
    vertical-align: middle;
}

.home-item-external-links-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px; /* Adjust as needed for spacing */
}

.bim-list-item-main-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* outline: none; /* Remove focus outline if not desired */
    /* text-indent: -9999px; /* Hide link text if any */
}
/* --- End Home List Item NEW STYLES --- */

/* --- Community Card NEW STYLES --- */
.bim-list-item.community-card {
    display: flex;
    border: 1px solid #fefefe; /* Or your theme's border */
    margin-bottom: 20px;
    background-color: #fff;
    overflow: hidden; /* If using floats or absolute positioning inside */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Example shadow */
}

.community-card-image-col {
    flex: 0 0 40%; /* Adjust percentage as needed */
    max-width: 40%; /* Sync with flex-basis */
    position: relative;
}
.community-card-image-col img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.community-card-no-image {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background-color: #f0f0f0; color: #ccc;
}

.community-card-details-col {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.community-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align title and location/offer block */
    margin-bottom: 8px;
}
.community-card-title {
    margin: 20px 0 0;
    font-size: 1.8em; /* Example size */
    color: #4E535B;
    font-weight: bold;
}
.community-card-location-offer {
    text-align: right;
    margin-top: -10px;
}
.community-card-location {
    font-size: 0.8em;
    color: #28B8B0;
    font-weight: bold;
    white-space: nowrap; 
}
.community-card-special-offer {
    font-size: 0.7em;
    color: #211451;
    font-weight: bold;
}

.community-card-pricing {
    font-size: .9em;
    color: #4E535B;
    font-weight: bold;
    margin-bottom: 15px;
    width: 180px;
    max-width: 100%;
}

.community-card-info-grid {
    display: flex;
    gap: 20px; /* Space between specs and amenities */
    margin-bottom: 15px;
}
.community-card-home-specs {
    flex: 1;
    /* display: flex; flex-direction: column; gap: 5px; */
}
.community-card-home-specs .spec-item {
    font-size: 0.8em;
    color: #555;
    margin-bottom: 5px;
    display: flex; /* For icon and text alignment */
    align-items: center;
}
.community-card-home-specs .spec-item svg { /* Style your SVGs */
    margin-right: 8px; 
    fill: #28B8B0; /* Example icon color */
    white-space: nowrap;
}
#bim-all-filters-btn .dashicons-filter:before {
    content: "";
    background-image: url(../svg/filters.svg);
    width: 22px;
    height: 20px;
    background-repeat: no-repeat;
    display: block;
}

.community-card-amenities {
    flex: 1;
}
.community-card-amenities h4 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: .9em;
    color: #555;
}
.community-card-amenities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8em;
    color: #555;
}
.community-card-amenities-list li {
    margin-bottom: 3px;
}

.community-card-links-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pushes this block to the bottom */
    padding-top: 15px; /* Space above links */
    border-top: 1px solid #f0f0f0; /* Separator */
}
.community-card-main-links {
    display: flex;
    flex-direction: column; /* Stack links vertically */
    gap: 8px;
}
.community-card-link {
    font-size: 0.95em;
    color: #28B8B0; /* Your theme's link color */
    text-decoration: none;
    display: inline-flex; /* For arrow alignment */
    align-items: center;
}
.community-card-link:hover {
    text-decoration: underline;
}
.community-card-link .arrow-right { /* Style your arrow */
    display: inline-block;
    width: 0; height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid #28B8B0; /* Arrow color */
    margin-left: 8px;
}

.community-card-share-link {
    font-size: 0.9em;
    color: #28b8b0;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.community-card-share-link:hover {
    color: #28B8B0;
}
.community-card-share-link .share-icon { /* Style your share icon */
    display: inline-block;
    width: 16px; height: 16px;
    margin-right: 5px;
    /* background-image: url('path/to/share-icon.svg'); */
}

.community-card-view-button {
    display: block;
    width: 100%; /* Full width button at the very bottom */
    padding: 12px 15px;
    margin-top: 15px;
    background-color: #28B8B0; /* Your theme button color */
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}
.community-card-view-button:hover {
    background-color: #24a59d; /* Darker shade on hover */
}

/* Ensure .bim-clickable-link styles are sufficient to make them clickable over the main card link */
.bim-clickable-link {
    position: relative;
    z-index: 2; /* Higher than main card link's z-index */
    font-size: 14px;
}

/* Community List Item (Original styles, check if they need updating) */
.bim-list-item.city-com-item { /* Added .bim-list-item for consistency */
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
}
.city-com-item h3 { margin-top: 0; margin-bottom: 5px; font-size: 1.3em; }
.city-com-item p { font-size: 0.9em; color: #555; margin-bottom: 10px; }
.city-com-item .city-com-info { margin-bottom: 10px; font-size: 0.9em; }
.city-com-item .city-com-price { font-weight: bold; margin-right: 10px; }
.city-com-item .city-com-stat { margin-right: 10px; color: #333; }
.city-com-item .theme-button {
    display: inline-block;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    background-color: #5cb85c; /* Example color */
    color: white;
    border: 1px solid #4cae4c;
}


/* Modal Styles */
.bim-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
.bim-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}
.bim-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.bim-modal-close:hover,
.bim-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
.bim-modal-filter-section { margin-bottom: 20px; }
.bim-modal-filter-section h4 { margin-top: 0; margin-bottom: 10px; }
.bim-modal-filter-section label { margin-left: 10px; font-size: 0.9em; }

.bim-modal-filter-section .bim-native-slider-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bim-modal-filter-section .bim-native-slider-container label {
    font-size: 0.9em; color: #555; margin-left: 0;
}
.bim-modal-filter-section .bim-native-slider-container input[type="range"] {
    width: 100%;
}
.bim-modal-actions { margin-top: 30px; display: flex; justify-content: space-between; }
#bim-modal-reset-filters { background: #eee; border: 1px solid #ccc; padding: 8px 12px; border-radius: 4px; cursor: pointer;color:#000000;}
#bim-modal-show-results.bim-button-primary { background-color: #28B8B0; color: white; border-color: #28B8B0; padding: 8px 12px; border-radius: 4px; cursor: pointer; border: 1px solid #28B8B0;}
#bim-modal-community-select { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px;}

/* Infowindow */
#bim-map-canvas .gm-style-iw-d {
    background: #fff !important;
}
.bim-infowindow img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin-bottom: 10px !important;
    object-fit: cover;
}
.bim-infowindow a {
    margin-top: 10px;
    margin-bottom: 5px;
    display: inline-block;
    text-align: right;
    float: right;
}
.bim-infowindow {
    line-height: 1.5em;
    padding: 5px;
    max-width: 250px;
    color: #4E535B;
    font-weight: 500;
}
.bim-infowindow .community-infowindow-links a, .bim-infowindow a.community-infowindow-view-community {
    margin-top: 0;
    margin-bottom: 0;
    float: none;
}
.bim-infowindow strong { font-size: 1.1em; }

.community-card-amenities {
    margin: -33px 0 0 20px;
}
.community-card-share {
    height: 18px;
    margin-left: auto;
}

/* Mobile Styles */
.bim-mobile-toggles { display: none; }

@media (max-width: 960px) {

    .bim-search-bar {
        max-width: 100%;
    }
    .bim-filters-toolbar {
        gap: 10px;
    }
    .community-card-amenities {
        margin: 0;
    }
    .home-item-price {
        margin-bottom: 2px;
    }
    #bim-list-content {
        padding: 10px 0;
    }
    .bim-tab-button {
        font-size: 1em;
    }

    .bim-filters-dropdowns {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .bim-filter-dropdown { width: 100%; }
    .bim-filter-button { width: 100%; box-sizing: border-box; }
    #bim-all-filters-btn { width: 100%; margin-top: 10px; box-sizing: border-box;}


    .bim-mobile-toggles {
        display: flex;
        width: 100%;
        border-radius: 50px;
        overflow: hidden;
        margin: 15px 0;
        border: 1px solid #ccc;
    }
    .bim-mobile-toggle-btn {
        margin: -1px;
        flex: 1;
        padding: 10px;
        background-color: #eee;
        border: 1px solid #ccc;
        cursor: pointer;
        color:#000000;
    }
    .bim-mobile-toggle-btn.active {
        background-color: #28b8b0;
        color: white;
    }

    .bim-map-list-wrapper {
        flex-direction: column;
        height: auto;
    }
    

    #brohn-interactive-map-container.bim-mobile-list-active #bim-map-canvas { display: none; }
    #brohn-interactive-map-container.bim-mobile-list-active #bim-results-list { display: flex; flex-direction: column; width: 100%; min-width: 100%; height: 500px; /* Example height */}

    #brohn-interactive-map-container.bim-mobile-map-active #bim-results-list { display: none; }
    #brohn-interactive-map-container.bim-mobile-map-active #bim-map-canvas { display: block; width: 100%; height: 500px; min-height: 500px;}

    #bim-map-canvas { display: none; }
    #bim-results-list { display: flex; width: 100%; min-width: 100%;}

    /* Home List Item Mobile Adjustments */
    .bim-list-item.home-item {
        flex-direction: column;
    }
    .bim-list-item.home-item .home-item-image-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        height: 200px; /* Or adjust as needed for mobile image aspect */
    }
    .bim-list-item.home-item .home-item-content-container {
        padding: 15px 0;
        position: static;
    }
    .bim-list-item.home-item .home-item-stats {
        gap: 0;
        justify-content: space-around;
    }
    .bim-list-item.home-item .home-item-stats div {
        text-align: center;
    }
    .bim-list-item.home-item .home-item-community-fp-info a.bim-clickable-link {
        margin-top: 5px;
    }
    .bim-list-item.home-item .home-item-special-banner {
        right: auto;
        left: 10px;
        top: 10px;
    }
    .bim-list-item.home-item .home-item-status {
        right: 0;
    }

    /* Mobile adjustments for community card */
    .bim-list-item.community-card {
        flex-direction: column;
        position: relative;
        margin: 15px 2px;
    }
    .community-card-special-offer {
        position: absolute;
        right: 0;
        top: 0;
        background: #ffffff;
        padding: 5px;
    }
    #bim-results-list {
        border-left: 0;
    }
    ul.community-card-amenities-list {
        column-count: 3;
    }
    .community-card-image-col {
        max-width: 100%;
        height: 200px; /* Or aspect ratio based height */
    }
    .community-card-details-col {
        padding: 15px;
    }
    .community-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .community-card-location-offer {
        text-align: left;
        margin-top: 5px;
    }
    .community-card-info-grid {
        flex-direction: column;
        gap: 15px;
    }
    .community-card-links-actions {
        flex-direction: column;
        align-items: end;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .bim-tab-slider-bg {
        display:none;
    }
    .bim-tabs-inner {
        flex-direction: column;
        background-color: transparent;
    }
    .bim-tab-button {
        border-radius: 0!important;
        background-color: #ffffff;
        width: 100%;
    }
    .bim-tab-button.active {
        background-color: #221551;
    }
}

/* --- Community InfoWindow Styles --- */
.bim-infowindow.community-infowindow {
    display: flex;
    gap: 15px; /* Space between image and details */
    padding: 10px 0!important; /* Override default Google Maps padding if necessary */
    font-family: sans-serif; /* Match your site's font */
    width: 320px; /* Approximate width from image, adjust as needed */
    line-height: 1.5;
    flex-direction: column;
}

/* Remove default Google Maps padding/margins if they interfere */
#bim-map-canvas .gm-style-iw-c { /* The main InfoWindow container */
    padding: 0 !important; 
    max-width: none !important; /* Allow our width to take effect */
    max-height: none !important;
}
#bim-map-canvas .gm-style-iw-d { /* The scrollable content area within InfoWindow */
    overflow: hidden !important; /* Prevent scrollbars if content fits */
}


.community-infowindow-image-col {
    flex: 0 0 100px; /* Fixed width for the image column */
    width: 100%;
    height: 100px; /* Maintain aspect ratio or set fixed height */
    overflow: hidden;
    border-radius: 0; /* Slight rounding if desired */
}
.community-infowindow-image-col img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.community-infowindow-no-image {
    width: 100px;
    height: 100px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 0.8em;
    border-radius: 4px;
}

.community-infowindow-details-col {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Helps space elements if height allows */
}

.community-infowindow-view-community {
    display: block;
    text-align: right;
    font-size: 0.85em;
    color: #28B8B0; /* Match your theme's link color */
    text-decoration: none;
    margin-bottom: 5px;
}
.community-infowindow-view-community:hover {
    text-decoration: underline;
}
.community-infowindow-view-community .external-link-icon {
    margin-left: 3px;
    vertical-align: middle;
    fill: #28B8B0; /* Match link color */
}

.community-infowindow-title {
    margin: 0 0 2px 0;
    font-size: 1.3em; /* Adjust as needed */
    color: #4E535B;
    font-weight: bold;
    line-height: 1.2;
}

.community-infowindow-pricing,
.community-infowindow-sqft {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 2px;
    font-weight: bold;
}
a.bim-clickable-link.share-link {
    margin-left: auto;
    display: none;
}
.community-infowindow-links {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap; /* Allow links to wrap if space is tight */
    gap: 8px; /* Horizontal gap between links */
    line-height: 1.3;
    justify-content: space-between;
    font-weight: 600;
}
.community-infowindow-links a {
    font-size: 0.8em;
    color: #28B8B0; /* Match your theme's link color */
    text-decoration: none;
    white-space: nowrap; /* Prevent individual links from breaking mid-text */
}
.community-infowindow-links a:hover {
    text-decoration: underline;
}
.community-infowindow-links a.share-link svg.share-icon {
    vertical-align: -2px; /* Fine-tune alignment of share icon */
}


/* Mobile adjustments for InfoWindow */
@media (max-width: 400px) { /* Adjust breakpoint as needed for when InfoWindow content needs to stack */
    .bim-infowindow.community-infowindow {
        flex-direction: column;
        width: 280px; /* Adjust width for smaller screens */
        gap:5px;
    }
    .community-infowindow-image-col {
        flex-basis: auto; /* Allow it to take full width if needed */
        width: 100%;
        height: 150px; /* Adjust height for stacked image */
        margin-bottom: 10px;
    }
    .community-infowindow-no-image {
        height: 120px; /* Adjust no-image placeholder height */
    }
    .community-infowindow-view-community {
        /* Optionally move this link or adjust styling for stacked layout */
    }
}


@media screen and (min-width: 1400px) {
    a.bim-clickable-link.share-link {
        margin-left: inherit;
        display: block;
    }
    .bim-infowindow img {
        width: 100% !important;
        max-width:100%;
    }
    .community-infowindow-image-col {
        flex: 0 0 150px;
        width: 100%;
    }
    .bim-infowindow.community-infowindow {
        width: 550px;
        flex-direction: row;
                max-width: 550px;
    }
}