/* Tipota MAPS / pesca — dots, cards, event page and lightbox. Layout, panel and colours come from common.css. */
.tipota-pesca-wrap, .tpesca-modal, .tpesca-lb {
  --tp-accent: var(--tmaps-accent);
  --tp-ink: var(--tmaps-ink);
  --tp-muted: var(--tmaps-muted);
  --tp-line: var(--tmaps-line);
  --tp-panel: var(--tmaps-panel);
  --tp-radius: var(--tmaps-radius);
  --tp-shadow: var(--tmaps-shadow);
}
.tpesca-modal *, .tpesca-lb * { box-sizing: border-box; }

/* Punti sulla mappa */
.tp-pin span { display: block; width: 20px; height: 20px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0,0,0,.55); transition: transform .12s; }
.tp-pin:hover span, .tp-pin:focus span { transform: scale(1.3); }

/* Scheda del punto (passaggio del mouse / tocco) */
.tp-tt, .tp-pop .leaflet-popup-content-wrapper { border-radius: 10px; padding: 0; box-shadow: var(--tp-shadow); border: 0; }
.tp-tt::before { display: none; }
.tp-pop .leaflet-popup-content { margin: 8px; }
.tp-card { display: flex; flex-direction: column; width: 190px; font-family: inherit; }
.tp-card img { width: 100%; height: auto; max-height: 190px; object-fit: contain; border-radius: 8px 8px 0 0; display: block; background: #e7eef1; }  /* the whole picture, never cropped */
.tp-pop .tp-card img { border-radius: 8px; }
.tp-card div { padding: 8px 10px; display: flex; flex-direction: column; line-height: 1.25; }
.tp-card b { font-size: 1rem; color: var(--tp-ink); display: block; white-space: nowrap; overflow: hidden; }
.tp-card span { font-size: .85rem; color: var(--tp-muted); }
.tp-open { display: block; width: 100%; margin-top: 6px; padding: 9px; border: 0; border-radius: 8px; background: var(--tp-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }

/* Pagina riepilogo */
html.tpesca-lock { overflow: hidden; }
.tpesca-modal { position: fixed; inset: 0; z-index: 99990; background: rgba(8, 20, 28, .62); display: flex; align-items: center; justify-content: center; padding: 18px; }
.tpesca-card { position: relative; width: min(1100px, 100%); max-height: 100%; overflow: auto; background: #fff; color: var(--tp-ink); border-radius: 14px; box-shadow: var(--tp-shadow); padding: 20px 22px 24px; }
.tpesca-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 44px; }
.tpesca-card h2 { margin: 0; font-size: 1.5rem; line-height: 1.15; }
.tpesca-card header p { margin: 2px 0 0; color: var(--tp-muted); }
.tpesca-card .tpesca-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.tpesca-x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef3f5; color: var(--tp-ink); font-size: 26px; line-height: 1; cursor: pointer; }
.tpesca-x:hover { background: #dfe8ec; }
.tpesca-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpesca-th { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #e7eef1; cursor: zoom-in; aspect-ratio: 4 / 3; }
.tpesca-th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.tpesca-th:hover img, .tpesca-th:focus img { transform: scale(1.05); }
.tpesca-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; text-shadow: 0 1px 8px rgba(0,0,0,.7); background: rgba(0,0,0,.15); }

/* Lightbox */
.tpesca-lb { position: fixed; inset: 0; z-index: 99999; background: rgba(0, 0, 0, .93); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tpesca-lb-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 46px 64px 0; }
.tpesca-lb-stage img, .tpesca-lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.tpesca-lb-cap { color: #d6dde1; padding: 12px 16px 16px; font-size: .95rem; text-align: center; }
.tpesca-lb-x, .tpesca-lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; border-radius: 50%; line-height: 1; }
.tpesca-lb-x:hover, .tpesca-lb-nav:hover { background: rgba(255,255,255,.28); }
.tpesca-lb-x { top: 12px; right: 14px; width: 42px; height: 42px; font-size: 28px; z-index: 2; }
.tpesca-lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 36px; padding-bottom: 5px; z-index: 2; }
.tpesca-lb-prev { left: 12px; } .tpesca-lb-next { right: 12px; }

@media (max-width: 820px) {
  .tpesca-modal { padding: 0; } .tpesca-card { border-radius: 0; height: 100%; padding: 16px 14px 20px; }
  .tpesca-grid { grid-template-columns: repeat(2, 1fr); }
  .tpesca-lb-stage { padding: 52px 8px 0; } .tpesca-lb-nav { width: 40px; height: 40px; font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { .tpesca-th img, .tp-pin span { transition: none; } }

.tpesca-lb-stage { position: relative; }
.tpesca-lb-stage img.tpesca-ph { filter: blur(6px); transition: filter .25s; }
.tpesca-lb-stage.tpesca-busy::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: tpesca-spin .8s linear infinite; pointer-events: none; }
@keyframes tpesca-spin { to { transform: rotate(360deg); } }
.tpesca-orig { color: #9fd0ec; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .tpesca-lb-stage.tpesca-busy::after { animation: none; } }
.tp-kg{font-style:normal;font-weight:600;opacity:.75;margin-left:.3em}
