﻿/* Mappa dei luoghi (pagina "Luoghi"): segnaposto, fumetto e ingrandimento. */
.mappa-luoghi-scheda { position: relative; margin: 1.5rem 0; }
#mappa-luoghi { height: 640px; width: 100%; border: 1px solid #d9d4c7; border-radius: 4px; background: #e8e4d8; z-index: 0; }
.mappa-luoghi-legenda { font-size: .95rem; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.mappa-luoghi-legenda span { display: inline-flex; align-items: center; gap: .4rem; }
.mappa-luoghi-legenda i { display: inline-block; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); box-sizing: border-box; }
.mappa-luoghi-legenda .lg-polo { width: 18px; height: 18px; background: #c8352b; }
.mappa-luoghi-legenda .lg-altro { width: 12px; height: 12px; background: #1d4e9e; }
.mappa-luoghi-legenda .lg-estero { width: 12px; height: 12px; background: #7e22ce; }
/* La voce "Fuori dalla Germania" compare solo dopo aver premuto il pulsante dei luoghi stranieri */
.mappa-luoghi-legenda .lg-estero-voce { display: none; }
.mappa-luoghi-scheda.con-estero .mappa-luoghi-legenda .lg-estero-voce { display: inline-flex; }

.luogo-pin span { display: block; width: 100%; height: 100%; border-radius: 50%; background: #1d4e9e; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4); box-sizing: border-box; }
.luogo-pin:not(.luogo-pin-polo) span { width: 16px; height: 16px; margin: 4px; }
.luogo-pin-polo span { background: #c8352b; border-width: 3px; }
.luogo-pin-estero span { background: #7e22ce; }
.luogo-pin:hover span, .luogo-pin:focus span { box-shadow: 0 0 0 3px rgba(240,180,0,.9); }

.leaflet-tooltip.luogo-fumetto { white-space: normal; width: min(340px, 70vw); padding: .65rem .85rem; background: #fffdf7; color: #222; border: 1px solid #bdb6a3; border-radius: 6px; box-shadow: 0 3px 12px rgba(0,0,0,.25); font-size: .95rem; line-height: 1.45; }
.leaflet-tooltip-top.luogo-fumetto::before { border-top-color: #bdb6a3; }
.luogo-fumetto strong, .luogo-popup strong { display: block; font-size: 1.05rem; margin-bottom: .2rem; }
.luogo-testo { display: block; }
.leaflet-popup.luogo-popup .leaflet-popup-content-wrapper { background: #fffdf7; color: #222; border-radius: 6px; }
.leaflet-popup.luogo-popup .leaflet-popup-tip { background: #fffdf7; }
.leaflet-popup.luogo-popup .leaflet-popup-content { margin: .8rem 1rem; font-size: .95rem; line-height: 1.45; }
.luogo-per-approfondire { display: block; margin-top: .6rem; font-weight: 600; }
.luogo-link { margin: .2rem 0 0 1.1rem; padding: 0; }
.luogo-link a { color: #1d4e9e; text-decoration: underline; text-decoration-style: dashed; }

/* I due pulsanti in alto a destra (20/11/2026): stessa forma e stessa larghezza, bordo colorato, ombra, effetto al passaggio del mouse e al tocco */
.leaflet-control.luoghi-ingrandisci,
.leaflet-control.luoghi-estero { display: block; box-sizing: border-box; width: 13rem; font: inherit; font-size: .9rem; font-weight: 600; line-height: 1.2; text-align: center; padding: .55rem .9rem; border-radius: 6px; cursor: pointer; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.35); transition: background-color .15s, color .15s, box-shadow .15s; }
.leaflet-control.luoghi-ingrandisci { color: #1d4e9e; border: 2px solid #1d4e9e; }
.leaflet-control.luoghi-ingrandisci:hover, .leaflet-control.luoghi-ingrandisci:focus-visible { background: #1d4e9e; color: #fff; }
.leaflet-control.luoghi-ingrandisci:active, .leaflet-control.luoghi-estero:active { box-shadow: 0 1px 2px rgba(0,0,0,.4); transform: translateY(1px); }
/* Pulsante dei luoghi fuori dalla Germania: sotto "Ingrandisci la mappa"; il testo va a capo su schermi stretti */
.leaflet-control.luoghi-estero { color: #7e22ce; border: 2px solid #7e22ce; }
.leaflet-control.luoghi-estero:hover, .leaflet-control.luoghi-estero:focus-visible { background: #7e22ce; color: #fff; }
.leaflet-control.luoghi-estero[aria-pressed="true"] { background: #7e22ce; color: #fff; }
.leaflet-control.luoghi-estero[aria-pressed="true"]:hover { background: #6b1bb3; border-color: #6b1bb3; }

.mappa-luoghi-grande #mappa-luoghi { position: fixed !important; inset: 0; width: 100vw; height: 100vh; border: 0; border-radius: 0; z-index: 99999; }
.mappa-luoghi-grande .mappa-luoghi-legenda { display: none; }
html.mappa-luoghi-blocco, html.mappa-luoghi-blocco body { overflow: hidden; }

@media (max-width: 768px) { #mappa-luoghi { height: 70vh; } }
@media (prefers-color-scheme: dark) {
  .leaflet-tooltip.luogo-fumetto, .leaflet-popup.luogo-popup .leaflet-popup-content-wrapper, .leaflet-popup.luogo-popup .leaflet-popup-tip { background: #2b2d31; color: #e8eaed; border-color: #555; }
  .leaflet-tooltip-top.luogo-fumetto::before { border-top-color: #555; }
  .luogo-link a { color: #9ec1ff; }
  #mappa-luoghi { border-color: #444; }
}

/* Legenda dei confini (dentro la carta, in basso a sinistra) */
.luoghi-confini-legenda { background: rgba(255,255,255,.92); color: #222; font-size: .85rem; line-height: 1.35; padding: .45rem .65rem; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.luoghi-confini-legenda div { display: flex; align-items: center; gap: .5rem; }
.luoghi-confini-legenda i { display: inline-block; width: 28px; height: 0; flex: none; }
.luoghi-confini-legenda .lc-impero { border-top: 3px solid #2563eb; }
.luoghi-confini-legenda .lc-storico { border-top: 3px dashed #d97706; }
.luoghi-confini-legenda .lc-oggi { border-top: 3px solid #15803d; }
@media (prefers-color-scheme: dark) { .luoghi-confini-legenda { background: rgba(40,42,46,.94); color: #e8eaed; } }

/* Fumetto aperto sotto o di lato alla localita': niente freccetta */
.luogo-popup.luogo-senza-punta .leaflet-popup-tip-container { display: none; }
