/* =========================================
   MAP COMPONENT — Dark Theme
   Leaflet + CartoDB Dark Matter tiles
   ========================================= */

/* Container */
.escort-map {
    width: 100%;
    border-radius: .5rem;
    overflow: hidden;
    background: #111;
    position: relative;
}
.escort-map-sm { height: 250px; }
.escort-map-md { height: 350px; }
.escort-map-lg { height: 450px; }
.escort-map-full { height: 60vh; min-height: 350px; }

/* Loading placeholder */
.escort-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: .85rem;
    gap: .5rem;
}
.escort-map-loading .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Popup card */
.map-popup-card {
    min-width: 200px;
    max-width: 260px;
    font-family: 'Manrope', sans-serif;
}
.map-popup-card .popup-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: .3rem .3rem 0 0;
}
.map-popup-card .popup-body {
    padding: .5rem .6rem;
    background: #1a1a1a;
    border-radius: 0 0 .3rem .3rem;
}
.map-popup-card .popup-name {
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    margin-bottom: .2rem;
}
.map-popup-card .popup-cat {
    font-size: .7rem;
    color: rgba(255,255,255,.6);
    margin-bottom: .3rem;
}
.map-popup-card .popup-link {
    display: inline-block;
    font-size: .75rem;
    color: var(--primary, #d45f11);
    text-decoration: none;
    font-weight: 600;
}
.map-popup-card .popup-link:hover {
    text-decoration: underline;
}

/* Override Leaflet popup for dark theme */
.leaflet-popup-content-wrapper {
    background: #1a1a1a !important;
    color: #fff !important;
    border-radius: .4rem !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.6) !important;
    padding: 0 !important;
}
.leaflet-popup-content {
    margin: 0 !important;
}
.leaflet-popup-tip {
    background: #1a1a1a !important;
}
.leaflet-popup-close-button {
    color: #fff !important;
}

/* Cluster markers */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background: rgba(212, 95, 17, .35) !important;
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background: rgba(212, 95, 17, .7) !important;
    color: #fff !important;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
}

/* Location label overlay */
.map-location-label {
    position: absolute;
    bottom: .75rem;
    left: .75rem;
    z-index: 500;
    background: rgba(0,0,0,.7);
    color: rgba(255,255,255,.8);
    padding: .3rem .7rem;
    border-radius: .3rem;
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .3rem;
    pointer-events: none;
}

/* Geolocation button */
.map-geolocate-btn {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 500;
    background: rgba(0,0,0,.7);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}
.map-geolocate-btn:hover {
    background: var(--primary, #d45f11);
}

/* "Cerca in quest'area" button */
.map-search-area-btn {
    position: absolute;
    top: .75rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 500;
    background: var(--primary, #d45f11);
    color: #fff;
    border: none;
    padding: .4rem 1rem;
    border-radius: 2rem;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
    display: none;
}
.map-search-area-btn:hover {
    opacity: .9;
}

/* Scroll hint overlay */
.map-scroll-hint {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}
.map-scroll-hint.visible {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .escort-map-full { height: 40vh; min-height: 250px; }
    .escort-map-lg { height: 300px; }
}
