/* Modern Map Styles for Leaflet/OpenStreetMap */

/* Define custom properties for theming */
:root {
    --map-primary-color: #2c5282;
    --map-accent-color: #68d391;
    --map-bg-color: #ffffff;
    --map-text-color: #1a202c;
    --map-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --map-border-radius: 8px;
    --map-transition: all 0.3s ease;
}
.leaflet-marker-icon{
    transform: translate3d(441px, 300px, 0px);
}
/* Map Container */
#googleMap,
.googleMap_shortcode_class,
#googleMap_shortcode {
    margin-bottom: 20px;
    z-index:10;
    width: 100%;
    height: 400px; /* Responsive height */
    min-height: 400px;
    background: linear-gradient(135deg, #edf2f7, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

/* Markers */
.wpestate_marker,
.openstreet_price_marker,
.interior_pin_price {
    position: absolute;
    background: var(--map-bg-color);
    border: 2px solid var(--map-primary-color);
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    color: var(--map-text-color);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 12px;
    text-align: center;
    z-index: 120;
    transition: var(--map-transition);
}

.wpestate_marker:hover,
.openstreet_price_marker:hover,
.apartments:hover,
.interior_pin_price:hover {
    background: var(--map-accent-color);
    color: #fff;
}

.openstreet_price_marker img,
.interior_pin_price img {
    max-width: none;
    border: none;
    border-radius: var(--map-border-radius);
}

.openstreet_price_marker:after,
.interior_pin_price:after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid var(--map-bg-color);
    z-index: 119;
    transition: var(--map-transition);
}

.openstreet_price_marker:hover:after,
.interior_pin_price:hover:after {
    border-top-color: var(--map-accent-color);
}

/* Map Controls */
#gmap-control {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 111;
}

#gmap-control span {
    background: var(--map-bg-color);
    color: var(--map-text-color);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: var(--map-border-radius);
    cursor: pointer;
    transition: var(--map-transition);
}

#gmap-control span:hover {
    background: var(--map-primary-color);
    color: #fff;
}

#gmap-control .wpresidence_map_styles_wrapper {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background: var(--map-bg-color);
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    padding: 10px;
}

#gmapzoomplus,
#gmapzoomminus,
#gmapzoomplus_sh,
#gmapzoomminus_sh {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--map-bg-color), #edf2f7);
    color: var(--map-text-color);
    font-size: 18px;
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    cursor: pointer;
    transition: var(--map-transition);
    z-index: 1000;
}

#gmapzoomminus,
#gmapzoomminus_sh {
    top: 70px;
}

#gmapzoomplus:hover,
#gmapzoomminus:hover,
#gmapzoomplus_sh:hover,
#gmapzoomminus_sh:hover {
    background: var(--map-accent-color);
    color: #fff;
    transform: translateY(-2px);
}

#slider_enable_street_sh {
    top: 120px;
    background: linear-gradient(135deg, var(--map-bg-color), #edf2f7);
    padding: 10px;
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    cursor: pointer;
    transition: var(--map-transition);
}

#slider_enable_street_sh:hover {
    background: var(--map-accent-color);
    color: #fff;
}

/* Loading and No-Result States */
#gmap-loading,
#gmap-noresult {
    background: var(--map-bg-color);
    color: var(--map-text-color);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    text-align: center;
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    padding: 20px;
    z-index: 100;
}

#gmap-loading {
    font-size: 24px;
    width: 320px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gmap-noresult {
    display: none;
    font-size: 18px;
    width: 300px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Leaflet Popups */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: transparent !important;
    box-shadow: none !important;
}

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

.leaflet-popup-content a {
    color: var(--map-primary-color) !important;
    text-decoration: none;
    transition: var(--map-transition);
}

.leaflet-popup-content a:hover {
    color: var(--map-accent-color) !important;
}

.info_details {
    background: var(--map-bg-color);
    border-radius: 12px;
    box-shadow: var(--map-shadow);
    margin: -140px 0 0 -190px; /* Adjusted for wider popup */
    padding: 0px; /* Reduced padding to decrease height */
    position: absolute;
    width: 320px; /* Increased width */
    height: 220px; /* Let content determine height */
    min-height: 100px; /* Reduced minimum height */
    font-family: 'Inter', sans-serif;
    transition: var(--map-transition);
    z-index: 130;
}
 .info_details:after {
    top: 99%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    border-top-color: #fff;
    border-width: 15px;
    left: 50%;
    margin-left: -9px;
} 
.leaflet-popup{
    left:0px !important;
}
.info_details img {
    width: 100%; /* Slightly larger image for wider popup */
    height: 175px; /* Reduced height to fit compact popup */
    object-fit: cover;
    border-radius: 0px;
    float: left;
    
}
.gradient{
    width: 100%;
    height: 66px;
    position: absolute;
    top: 109px;
    left: 0px;
    background: linear-gradient(to bottom, rgba(43, 49, 62, 0) 0%, rgba(41, 47, 61, 1) 82%, rgba(40, 47, 61, 1) 100%);
}
.info_details.price_infobox {
    margin-top: -130px; /* Adjusted for new height */
}

.leaflet-popup-content .info_details.price_infobox,
.leaflet-popup-content .info_details.openstreet_map_price_infobox {
    margin-top: -100px; /* Adjusted for Leaflet popup */
}

.infobox_title {
   line-height: 1.2em;
    font-size: 16px;
    color: #fff;
    height:auto;
    font-weight: 500;
    width: 85%;
    position: absolute;
    bottom: 55px;
    left: 0px;
}

#infobox_title {
   line-height: 1.2em;
    font-size: 16px;
    color: #fff !important;
    
    font-weight: 500;
    width: 85%;
}
.infobox_title a {
    display: inline-block;
    max-width: 200px;
    word-wrap: break-word;
    color: var(--map-text-color);
    font-size: 14px; /* Slightly smaller for compact height */
    font-weight: 600;
    line-height: 1.2em; /* Tighter line height */
    padding: 0 0 0 10px;
    text-decoration: none;
}

.infobox_title a:hover,
.prop_pricex {
    color: var(--map-accent-color);
}

.prop_pricex {
   float: left;
    display: inline;
    color: #ffffff;
    font-size: 16px !important;
    opacity: 1;
    line-height: 0px;
    position: absolute;
    right: 15px;
    bottom: 55px;
}

.infocur {
    color: #d2d5d9;
    font-size: 13px;
    margin-left: 5px;
}

.infocur.infocur_first {
    margin-left: 0;
    margin-right: 5px;
}

.infobox_details {
    margin-top:8px;
    float: left;
    font-size: 12px; /* Smaller font to reduce height */
    width: 260px;
}

#infobath, #inforoom, #infosize {
    margin-left: 10px;
    color: var(--map-text-color);
}

#infosize {
    padding-left: 0;
}

#infocloser {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #193028;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    content: "✕";
    transition: var(--map-transition);
    z-index: 131;
}
 #infocloser::before {
    content: "✕";
    display: block;
} 
#inforoom{
    font-size: 16px !important;
    background-image: url(/wordpress/wp-content/themes/wpresidence/public/css/css-images/icons/door.svg);
    height: 16px;
    background-repeat: no-repeat;
    margin-left: 15px;
    padding-left: 24px;
    line-height: 21px;
    margin-top: -3px;
    background-size: contain;
}
#infosize{
    font-size: 16px !important;
    background-image: url(/wordpress/wp-content/themes/wpresidence/public/css/css-images/icons/costpin.svg);
    height: 16px;
    background-repeat: no-repeat;
    margin-left: 15px;
    padding-left: 23px;
    line-height: 21px;
    margin-top: -3px;
    background-size: contain;
    background-size: 21px;
    background-position-y: -1px;
}
#infocloser:hover {
    background: var(--map-accent-color);
    transform: scale(1.1);
}

.leaflet_cluster {
    background: var(--map-primary-color);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--map-shadow);
    transition: var(--map-transition);
}

.leaflet_cluster:hover {
    background: var(--map-accent-color);
    transform: scale(1.1);
}

.wpresidence_leaflet_label {
    background: var(--map-bg-color);
    border-radius: var(--map-border-radius);
    box-shadow: var(--map-shadow);
    color: var(--map-text-color);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 10px;
    margin-left: -50px;
    text-align: center;
    width: 100px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* .info_details {
        width: 300px;
        margin: -100px 0 0 -150px;
    }

    .leaflet-popup-content .info_details.price_infobox,
    .leaflet-popup-content .info_details.openstreet_map_price_infobox {
        margin-top: -110px; 
    }

    .infobox_title,
    .infobox_details {
        width: 180px;
    }

    .info_details img {
        width: 80px;
        height: 50px;
    }

    #gmap-loading,
    #gmap-noresult {
        width: 260px;
    } */
}

#slider_enable_slider{
    display:none !important;
}

/* Reset .interior_pin_price to be just plain price */
.wpestate_marker .interior_pin_price,
.openstreet_price_marker .interior_pin_price {
    white-space: nowrap;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--map-text-color);
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    position: static;
}
div[id*="_sh_"] {
    display: none !important;
}
