/* ---------- Mappa ---------- */
.map-wrap { padding: 0; overflow: hidden; position: relative; margin-bottom: 12px; }
#map { height: 38vh; min-height: 230px; max-height: 420px; background: var(--line); z-index: 1; }
@media (min-width: 1000px) {
  .with-nav main { max-width: 1280px; }
  #view-prenota.active { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; align-items: start; }
  #activeBanner { grid-column: 1 / -1; margin-bottom: 0; }
  .map-wrap { position: sticky; top: 78px; margin-bottom: 0; }
  #map { height: calc(100vh - 110px); max-height: 760px; }
  #bookForm { margin-top: 0; }
  #view-bacheca, #view-corse, #view-profilo { max-width: 760px; margin: 0 auto; }
}
.map-locate {
  position: absolute; right: 12px; bottom: 12px; z-index: 500; width: 44px; height: 44px; border-radius: 14px; border: 0;
  background: var(--card); color: var(--text); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center;
}
.map-locate svg { width: 22px; height: 22px; }
.leaflet-container { font: inherit; }
.pin {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); display: grid; place-items: center;
}
.pin span { transform: rotate(45deg); color: #fff; font-weight: 800; font-size: 13px; }
.pin.a { background: #15924a; }
.pin.b { background: #c62828; }

/* ---------- Indirizzi ---------- */
.route-box { position: relative; display: flex; flex-direction: column; gap: 8px; padding-right: 46px; }
.route-line { position: absolute; left: 13px; top: 24px; bottom: 24px; border-left: 2px dashed var(--line); }
.addr-row { position: relative; display: flex; align-items: center; gap: 8px; }
.addr-row input { padding-left: 34px; padding-right: 44px; }
.addr-dot { position: absolute; left: 9px; width: 10px; height: 10px; border-radius: 50%; z-index: 1; }
.addr-dot.a { background: #15924a; box-shadow: 0 0 0 3px #15924a33; }
.addr-dot.b { background: #c62828; border-radius: 2px; box-shadow: 0 0 0 3px #c6282833; }
.mini-btn {
  position: absolute; right: 4px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: none;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.mini-btn svg { width: 19px; height: 19px; }
.mini-btn.on { background: var(--brand); color: var(--brand-ink); }
.swap-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.swap-btn svg { width: 18px; height: 18px; }
.suggest {
  position: absolute; left: 0; right: 46px; top: 100%; margin-top: 6px; z-index: 950; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; max-height: 300px; overflow-y: auto;
}
.suggest button {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 12px; border: 0; background: none;
  font: inherit; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--line);
}
.suggest button:last-child { border-bottom: 0; }
.suggest button:hover, .suggest button:focus { background: var(--bg); outline: none; }
.suggest svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.suggest .s-sub { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest .s-main { display: block; font-weight: 600; }
.suggest .s-wrap { min-width: 0; }

/* ---------- Preventivo ---------- */
.quote { display: grid; grid-template-columns: 1fr 1fr 1.3fr; background: var(--brand-soft); border-radius: 14px; padding: 12px; gap: 8px; text-align: center; }
.quote .q-val { font-size: 18px; font-weight: 800; }
.quote .q-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.quote .q-price .q-val { font-size: 22px; }
.quote .q-note { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---------- Banner corsa attiva ---------- */
.active-banner {
  display: flex; align-items: center; gap: 12px; background: var(--text); color: var(--bg); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow);
}
.active-banner .ab-ico { font-size: 26px; }
.active-banner b { display: block; }

/* ---------- Corse ---------- */
.ride { position: relative; }
.ride-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ride-route { display: grid; grid-template-columns: 14px 1fr; gap: 4px 10px; align-items: start; }
.ride-route .rd { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.ride-route .rd.a { background: #15924a; }
.ride-route .rd.b { background: #c62828; border-radius: 2px; }
.ride-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.ride-meta b { color: var(--text); }
.ride-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ride.live { border: 2px solid var(--brand); }
.eta-box { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 12px; margin-bottom: 10px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.eta-box .big { font-size: 28px; line-height: 1; }
.steps { display: flex; gap: 4px; margin: 4px 0 12px; }
.steps i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.steps i.done { background: var(--ok); }
.steps i.now { background: var(--brand); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- Bacheca ---------- */
.post { padding: 0; overflow: hidden; }
.post img { width: 100%; max-height: 420px; object-fit: cover; display: block; background: var(--line); cursor: zoom-in; }
.post-body { padding: 14px 16px 16px; }
.post-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.post h3 { font-size: 18px; margin-bottom: 6px; }
.post-text { white-space: normal; word-wrap: break-word; }
.post-text a { color: var(--info); }
.post-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.img-zoom { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 4000; display: grid; place-items: center; cursor: zoom-out; }
.img-zoom img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }

/* ---------- Profilo ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.list-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; border-bottom: 1px solid var(--line); text-align: left; text-decoration: none; }
.list-btn:last-child { border-bottom: 0; }
.list-btn svg { width: 20px; height: 20px; color: var(--muted); }
.install-card { background: var(--brand-soft); }

/* ---------- Avviso installazione iPhone ---------- */
.ios-banner {
  display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--text); border-radius: var(--radius);
  padding: 10px 10px 10px 12px; box-shadow: var(--shadow); margin-bottom: 12px; animation: fade .25s ease;
}
.ios-banner img { width: 40px; height: 40px; border-radius: 10px; }
.ios-banner .close-x { width: 30px; height: 30px; flex-shrink: 0; }
@media (min-width: 1000px) { .ios-banner { grid-column: 1 / -1; margin-bottom: 0; } }
