/* Finestra della privacy, segnaposto sulla mappa (presa, asta, ombra), suggerimento */

/* informativa privacy: finestra sopra la pagina, stesso vetro del pannello */
.privacy {
  width: min(560px, calc(100% - 32px)); max-height: min(86vh, 760px); max-height: min(86dvh, 760px);
  padding: 0; border: 1px solid var(--linea); border-radius: 20px;
  background: var(--carta-solida); color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.privacy::backdrop { background: rgba(12, 18, 34, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.privacy[open] { display: flex; flex-direction: column; }
.privacy header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--linea); }
.privacy h2 { margin: 0; font-family: var(--cond); font-size: 21px; }
.privacy .body { overflow-y: auto; padding: 4px 18px 20px; font-size: 14px; line-height: 1.55; }
.privacy h3 { margin: 18px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muto); }
.privacy p, .privacy ul { margin: 6px 0; max-width: 65ch; }
.privacy ul { padding-left: 18px; }
.privacy .lead { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--nebbia); font-weight: 600; }
.privacy .upd { margin-top: 18px; font-size: 12px; color: var(--muto); }


.mk { width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35); cursor: grab; }
.mk.start { background: var(--blu); }
/* segnaposto trascinabili sul percorso scelto (paesi attraversati) */
.mk.way { width: 30px; height: 40px; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: grab;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.mk.way svg { width: 100%; height: 100%; display: block; }
.mk.way:active { cursor: grabbing; }
.mk.way.fisso, .mk.way.fisso:active { cursor: default; }  /* tappe di un tour salvato o condiviso: non si spostano */
/* suggerimento sui segnaposto: pillola scura sopra la mappa, sotto i chip; compare e svanisce da sola */
.map-hint { position: fixed; z-index: 2; top: 70px; left: 16px; right: 16px; width: fit-content; max-width: 360px; margin: 0 auto; transform: translateY(-6px);
  display: flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 14px; background: rgba(27, 27, 31, 0.92); color: #fff;
  font: 600 13px/1.3 var(--font); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; }
.map-hint.on { opacity: 1; transform: none; }
.map-hint svg { width: 14px; height: 19px; flex: none; color: var(--blu); }
html:not(.land) .map-hint { top: calc(58px + env(safe-area-inset-top)); }
/* computer e orizzontale: al centro della parte di mappa libera, a destra del pannello */
@media (min-width: 761px) { .map-hint { left: 440px; } }
html.land .map-hint { top: 52px; left: calc(min(380px, 46vw) + 28px); }
/* segnaposto preso (dopo averlo tenuto premuto): si ingrandisce e si stacca dalla mappa */
/* segnaposto preso: si solleva sopra il suo punto, un'asta verticale lo collega a terra e sotto resta l'ombra.
   La punta dell'asta (e l'ombra) e' il punto esatto dove verra' lasciato */
.mk.lifted { z-index: 5; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3)); }
.mk::before, .mk::after { content: ""; position: absolute; left: 50%; pointer-events: none; opacity: 0; transition: opacity .15s, height .15s; }
.mk::after { width: 3px; margin-left: -1.5px; height: 0; border-radius: 2px; background: #1B1B1F; box-shadow: 0 0 0 1.5px #fff; }  /* asta */
.mk::before { width: 14px; height: 6px; margin-left: -7px; border-radius: 50%; background: rgba(0, 0, 0, .35); }  /* ombra a terra */
.mk.lifted::before, .mk.lifted::after { opacity: 1; }
/* goccia sul percorso (punta in basso = punto): la goccia sale di 44 px, l'asta scende dalla punta a terra */
.mk.way > svg { transition: transform .15s ease-out; transform-origin: 50% 100%; }
.mk.way.lifted > svg { transform: translateY(-44px) scale(1.12); }
.mk.way::after { bottom: 0; }
.mk.way.lifted::after { height: 45px; }
.mk.way::before { bottom: -3px; }
/* tondi (partenza, passaggi, meta: il centro = punto): il tondo sale di 44 px, l'asta va dal suo bordo a terra */
.mk:not(.way) { transition: translate .15s ease-out; }
.mk:not(.way).lifted { translate: 0 -44px; outline: 4px solid rgba(255, 255, 255, .75); }
.mk:not(.way)::after { top: 100%; }
.mk:not(.way).lifted::after { height: calc(44px - 50%); }
.mk:not(.way)::before { top: calc(50% + 44px - 3px); }
.mk.via { width: 24px; height: 24px; background: #111; border: 3px solid #fff; color: #fff; display: grid; place-items: center;
  font: 800 12px/1 system-ui, sans-serif; }
.mk.end { width: 30px; height: 30px; background: #fff; border: 2px solid #111; display: grid; place-items: center; color: #111; }
.mk.end svg { width: 17px; height: 17px; }

.maplibregl-ctrl-bottom-right { z-index: 1; }

[hidden] { display: none !important; }
