/* ============================================
   Directory Map View — EcomNinja
   Leaflet + MarkerCluster custom styles
   ============================================ */

/* --- Map Container --- */
#directory-map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    z-index: 1;
}

@media (max-width: 768px) {
    #directory-map {
        height: 350px;
        border-radius: 8px;
    }
}

/* --- Custom Marker --- */
.ecomninja-marker {
    background: #FF5252;
    border: 2px solid #fff;
    border-radius: 50%;
    width: 12px;
    height: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

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

.ecomninja-popup .leaflet-popup-content {
    margin: 0;
    min-width: 220px;
    max-width: 280px;
}

.ecomninja-popup .leaflet-popup-tip {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.popup-card {
    display: flex;
    gap: 12px;
    padding: 12px;
}

.popup-card__thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
}

.popup-card__info {
    flex: 1;
    min-width: 0;
}

.popup-card__title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-card__category {
    font-size: 11px;
    color: #FF5252;
    font-weight: 500;
    margin: 0 0 2px;
}

.popup-card__location {
    font-size: 11px;
    color: #6b7280;
    margin: 0;
}

.popup-card__actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}

.popup-card__btn {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.popup-card__btn:hover {
    opacity: 0.85;
}

.popup-card__btn--details {
    background: #FF5252;
    color: #fff;
}

.popup-card__btn--visit {
    background: #f3f4f6;
    color: #374151;
}

/* --- Cluster Icons (MarkerCluster override) --- */
.marker-cluster-small {
    background-color: rgba(255, 82, 82, 0.2) !important;
}
.marker-cluster-small div {
    background-color: rgba(255, 82, 82, 0.6) !important;
    color: #fff !important;
    font-weight: 600;
}

.marker-cluster-medium {
    background-color: rgba(255, 82, 82, 0.3) !important;
}
.marker-cluster-medium div {
    background-color: rgba(255, 82, 82, 0.7) !important;
    color: #fff !important;
    font-weight: 600;
}

.marker-cluster-large {
    background-color: rgba(255, 82, 82, 0.4) !important;
}
.marker-cluster-large div {
    background-color: rgba(255, 82, 82, 0.85) !important;
    color: #fff !important;
    font-weight: 600;
}

/* --- No-coords notice --- */
.map-notice {
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
    border: 1px solid #e5e7eb;
    border-top: 0;
}

.map-notice a {
    color: #FF5252;
    font-weight: 500;
    text-decoration: none;
}

.map-notice a:hover {
    text-decoration: underline;
}
