/* Modern Map View Styling */

/* Map Container */
#properties-map {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

/* Map Info Control */
.map-info {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-size: 13px;
}

.map-info-content h6 {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #2c2c2c;
    font-size: 14px;
}

.map-info-content p {
    margin: 0;
    color: #666;
    font-size: 12px;
}

/* Property Markers */
.property-marker-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.property-marker {
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.property-marker:hover {
    transform: scale(1.15);
}

.property-marker .marker-pin {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00bf27 0%, #00a520 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 191, 39, 0.4);
    border: 3px solid white;
    transition: all 0.3s ease;
}

.property-marker:hover .marker-pin {
    box-shadow: 0 6px 20px rgba(0, 191, 39, 0.6);
    transform: scale(1.1);
}

/* Leaflet Popup Customization */
.property-popup .leaflet-popup-content-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    padding: 0;
}

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

.property-popup-content {
    overflow: hidden;
}

.popup-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 10px 10px 0 0;
}

.popup-body {
    padding: 15px;
}

.popup-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c2c2c;
    line-height: 1.4;
}

.popup-location {
    margin: 8px 0;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.popup-location i {
    color: #00bf27;
    font-size: 11px;
}

.popup-category {
    margin: 8px 0;
    font-size: 11px;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    color: #666;
}

.popup-price {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #00bf27;
    margin: 10px 0;
}

.popup-contacts {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.contact-link:hover {
    background: #00bf27;
    color: white;
    transform: translateY(-2px);
}

.contact-link.whatsapp:hover {
    background: #25d366;
}

.popup-view-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #00bf27;
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    transition: background 0.3s ease;
}

.popup-view-btn:hover {
    background: #00a520;
    color: white;
}

/* No Locations Message */
.map-no-locations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.no-locations-content {
    text-align: center;
}

.no-locations-content i {
    font-size: 64px;
    color: #d0d0d0;
    display: block;
    margin-bottom: 20px;
}

.no-locations-content h4 {
    margin: 0 0 10px 0;
    color: #2c2c2c;
    font-size: 18px;
    font-weight: 700;
}

.no-locations-content p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

/* Leaflet Zoom Controls Styling */
.leaflet-control-zoom {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom a {
    background: white;
    color: #2c2c2c;
    border: none;
    font-weight: 700;
    width: 36px;
    height: 36px;
    line-height: 36px;
    transition: all 0.3s ease;
}

.leaflet-control-zoom a:hover {
    background: #00bf27;
    color: white;
}

.leaflet-control-zoom a:first-child {
    border-radius: 8px 8px 0 0;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Map Attribution */
.leaflet-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    font-size: 11px;
}

.leaflet-attribution a {
    color: #00bf27;
}

/* Responsive Design */
@media (max-width: 768px) {
    #properties-map {
        height: 400px;
    }

    .property-popup-content {
        max-width: 280px;
    }

    .popup-image {
        height: 140px;
    }

    .map-info {
        padding: 10px;
        font-size: 12px;
    }

    .popup-body {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    #properties-map {
        height: 300px;
        margin-bottom: 15px;
    }

    .property-marker .marker-pin {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .popup-title {
        font-size: 13px;
    }

    .popup-price {
        font-size: 14px;
    }
}

/* Highlight animation for synchronized views */
/* REMOVED - was causing cards to change appearance on hover */
/* .property-card.highlighted {
    background-color: #f0fff4;
    border-color: #00bf27;
} */

/* Smooth transitions */
.leaflet-zoom-animated {
    transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1) !important;
}

/* Custom scrollbar for popup */
.property-popup .leaflet-popup-content {
    padding: 0;
    margin: 0;
}

/* FontAwesome Icon Styling for Map */
.property-marker i,
.popup-location i,
.contact-link i,
.no-locations-content i {
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    font-style: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Map marker icon */
.property-marker .marker-pin i {
    font-size: 18px;
    font-weight: 400;
}

/* Popup location icon */
.popup-location i {
    font-size: 11px;
    font-weight: 400;
}

/* Contact link icons */
.contact-link i {
    font-size: 14px;
    font-weight: 400;
}

/* No locations icon */
.no-locations-content i {
    font-size: 64px;
    font-weight: 400;
}

/* =============================================
   THEME-SPECIFIC POPUP COLORS
   ============================================= */

/* PROPERTY - GREEN THEME */
.property-popup-content.property-view .popup-location i {
    color: #00bf27 !important;
}

.property-popup-content.property-view .popup-price {
    color: #00bf27 !important;
}

.property-popup-content.property-view .contact-link:hover {
    background: #00bf27 !important;
    color: white !important;
}

.property-popup-content.property-view .popup-view-btn {
    background: #00bf27 !important;
}

.property-popup-content.property-view .popup-view-btn:hover {
    background: #00a520 !important;
}

/* ADZ - GRAY THEME */
.property-popup-content.adz-new-view .popup-location i {
    color: #666666 !important;
}

.property-popup-content.adz-new-view .popup-price {
    color: #666666 !important;
}

.property-popup-content.adz-new-view .contact-link:hover {
    background: #666666 !important;
    color: white !important;
}

.property-popup-content.adz-new-view .popup-view-btn {
    background: #666666 !important;
}

.property-popup-content.adz-new-view .popup-view-btn:hover {
    background: #444444 !important;
}

/* JOB - PURPLE THEME */
.property-popup-content.job-view .popup-location i {
    color: #b343f5 !important;
}

.property-popup-content.job-view .popup-price {
    color: #b343f5 !important;
}

.property-popup-content.job-view .contact-link:hover {
    background: #b343f5 !important;
    color: white !important;
}

.property-popup-content.job-view .popup-view-btn {
    background: #b343f5 !important;
}

.property-popup-content.job-view .popup-view-btn:hover {
    background: #8800dd !important;
}

/* SHOP - RED THEME */
.property-popup-content.shop-list .popup-location i {
    color: #ff2d2d !important;
}

.property-popup-content.shop-list .popup-price {
    color: #ff2d2d !important;
}

.property-popup-content.shop-list .contact-link:hover {
    background: #ff2d2d !important;
    color: white !important;
}

.property-popup-content.shop-list .popup-view-btn {
    background: #ff2d2d !important;
}

.property-popup-content.shop-list .popup-view-btn:hover {
    background: #cc0000 !important;
}

