/* ── Neighborhood Map — Estilos (Leaflet edition) ── */

.nm-wrapper {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    margin: 0 0 2rem;
}

/* Header */
.nm-header { margin-bottom: 14px; }
.nm-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.2;
}
.nm-subtitle { font-size: .95rem; color: #666; margin: 0; }

/* Map */
.nm-map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    margin-bottom: 24px;
}
.nm-map { width: 100%; height: 100%; }

/* Override Leaflet attribution */
.leaflet-control-attribution { font-size: 10px !important; }

/* ── Custom Leaflet DivIcon marker ── */
.nm-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 44px;
    background: #2d2d2d;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    cursor: pointer;
    transition: background .2s, transform .15s;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
    border: 2px solid rgba(255,255,255,.25);
}
.nm-marker:hover,
.nm-marker.active {
    background: #1a73e8;
    transform: rotate(-45deg) scale(1.2);
    z-index: 9999 !important;
}
.nm-marker-inner {
    transform: rotate(45deg);
    display: block;
    line-height: 1;
}

/* Lift active marker above others */
.leaflet-marker-icon:has(.nm-marker.active) { z-index: 1000 !important; }

/* ── Location list ── */
.nm-list { display: grid; gap: 8px; }
.nm-cols-2 { grid-template-columns: repeat(2,1fr); }
.nm-cols-3 { grid-template-columns: repeat(3,1fr); }
.nm-cols-4 { grid-template-columns: repeat(4,1fr); }

@media (max-width: 900px) {
    .nm-cols-4, .nm-cols-3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 540px) {
    .nm-cols-4, .nm-cols-3, .nm-cols-2 { grid-template-columns: repeat(2,1fr); }
}

.nm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
    user-select: none;
}
.nm-list-item:hover  { background: #f4f4f4; }
.nm-list-item.active { background: #e8f0fe; }

.nm-list-pin {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 34px;
    background: #2d2d2d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    transition: background .2s;
}
.nm-list-pin span { transform: rotate(45deg); display: block; line-height: 1; }

.nm-list-item:hover .nm-list-pin,
.nm-list-item.active .nm-list-pin { background: #1a73e8; }

.nm-list-name {
    font-size: .875rem;
    color: #333;
    line-height: 1.3;
    font-weight: 500;
}

/* ── Info card ── */
.nm-infocard {
    position: absolute;
    top: 60px;
    left: 20px;
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px 16px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.18);
    max-width: 260px;
    min-width: 180px;
    border: 1px solid #e0e0e0;
    pointer-events: auto;
}
.nm-infocard-close {
    position: absolute;
    top: 8px; right: 10px;
    background: none; border: none;
    font-size: 16px; color: #888;
    cursor: pointer; padding: 0; line-height: 1;
}
.nm-infocard-close:hover { color: #333; }
.nm-infocard-title {
    display: block;
    font-size: .95rem; font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    padding-right: 18px;
}
.nm-infocard-desc {
    font-size: .85rem; color: #555;
    margin: 0; line-height: 1.5;
}
