/* SAMT Map Styles */
#samt-map-home,
#propertiesMap {
    width: 100%;
    height: 600px;
    z-index: 1;
    background: #f5f5f5;
    /* Fallback */
}

.map-container {
    width: 100%;
    min-height: 600px;
}

.leaflet-map {
    width: 100%;
    height: 600px;
}

/* Custom Marker */
.samt-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
}

.samt-marker-dot {
    width: 16px;
    height: 16px;
    background-color: #FF5A1F;
    border: 3px solid #FFFFFF;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

/* Marker Hover State aka Bounce */
.samt-marker-icon.active .samt-marker-dot,
.samt-marker-icon:hover .samt-marker-dot {
    transform: scale(1.3);
    border-color: #000;
}

/* Cluster Customization - Override default MarkerCluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: transparent !important;
    background-color: transparent !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div,
.marker-cluster div {
    width: 40px;
    height: 40px;
    margin-left: 0;
    margin-top: 0;
    text-align: center;
    border-radius: 50%;
    background-color: #1A1A1A !important;
    color: #fff !important;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-weight: bold;
    font-size: 14px;
    line-height: 40px;
    border: 3px solid #FF5A1F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Popup Styles */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
    width: 250px !important;
}

.samt-map-popup {
    display: flex;
    flex-direction: column;
}

.samt-map-popup img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.samt-map-popup .content {
    padding: 12px;
}

.samt-map-popup h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: bold;
    color: #1A1A1A;
}

.samt-map-popup .price {
    font-size: 13px;
    color: #FF5A1F;
    font-weight: 600;
}

.samt-map-popup .details {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}


.samt-map-popup .btn-view {
    display: block;
    margin-top: 10px;
    text-align: center;
    background: #1A1A1A;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
}

/* RTL Support for Popup */
[dir="rtl"] .samt-map-popup {
    text-align: right;
    direction: rtl;
}

/* Icon Spacing */
.samt-map-popup .city svg {
    margin-right: 3px;
    vertical-align: middle;
}

[dir="rtl"] .samt-map-popup .city svg {
    margin-right: 0 !important;
    margin-left: 3px !important;
}

[dir="rtl"] .leaflet-popup-close-button {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] .samt-map-popup h4 {
    font-family: inherit;
    /* Ensure it picks up Arabic font */
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 90, 31, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 90, 31, 0);
    }
}