/* ==========================================================
   psm.css - Mappa Effort per paese
   Coerente con style.css e default.css del sito
   ========================================================== */

/* ---------- Marker: bandiera come icona ---------- */
.psm-marker {
    background: none;
    border: none;
}

.psm-pin {
    position: relative;
    width: 64px;
    height: 74px;
    cursor: pointer;
    transition: transform .15s ease;
}

.psm-pin:hover {
    transform: translateY(-3px) scale(1.06);
}

.psm-flag {
    position: relative;
    width: 64px;
    height: 44px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 3px solid var(--psm-color, #999);
    padding: 3px;
    background: #dcedf5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .4);
    overflow: hidden;
}

.psm-flag img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.psm-code {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 0 3px;
    text-align: center;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1;
    color: #444;
    background: #dcedf5;
}

/* punta del segnaposto */
.psm-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--psm-color, #999);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3));
}

/* ---------- Sezione ---------- */
#map {
    height: 800px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}


#spqr .container {
    width: 95%;
    max-width: 1600px;
}


@media (max-width: 767px) {
    #map {
        height: 450px;
    }
    #spqr .container {
        width: 100%;
    }
}


/* ---------- Legenda ---------- */
.psm-legend {
    margin-top: 20px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
}

.psm-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px;
}

.psm-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ---------- Popup ---------- */
.leaflet-popup-content {
    margin: 12px 14px;
    min-width: 200px;
    font-family: Lato, sans-serif;
    font-weight: 300;
    color: #666;
}

.psm-popup h2 {
    margin: 0 0 8px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444;
}

.psm-badge {
    display: inline-block;
    margin-bottom: 8px;
    padding: 2px 8px;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1d1f23;
}

.psm-popup ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.psm-popup li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.psm-popup li:last-child {
    border-bottom: none;
}

.psm-eff {
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}