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

/* Punti sulla mappa */
.tu-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; }
.tu-pin:hover span, .tu-pin:focus span { transform: scale(1.3); }

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

/* Pagina riepilogo */
html.tuw-lock { overflow: hidden; }
.tuw-modal { position: fixed; inset: 0; z-index: 99990; background: rgba(8, 20, 28, .62); display: flex; align-items: center; justify-content: center; padding: 18px; }
.tuw-card { position: relative; width: min(1100px, 100%); max-height: 100%; overflow: auto; background: #fff; color: var(--tu-ink); border-radius: 14px; box-shadow: var(--tu-shadow); padding: 20px 22px 24px; }
.tuw-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 44px; }
.tuw-card h2 { margin: 0; font-size: 1.5rem; line-height: 1.15; }
.tuw-card header p { margin: 2px 0 0; color: var(--tu-muted); }
.tuw-card .tuw-dot { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.tuw-x { position: absolute; top: 10px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef3f5; color: var(--tu-ink); font-size: 26px; line-height: 1; cursor: pointer; }
.tuw-x:hover { background: #dfe8ec; }
.tuw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tuw-th { position: relative; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #e7eef1; cursor: zoom-in; aspect-ratio: 4 / 3; }
.tuw-th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.tuw-th:hover img, .tuw-th:focus img { transform: scale(1.05); }
.tuw-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 */
.tuw-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; }
.tuw-lb-stage { flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; padding: 46px 64px 0; }
.tuw-lb-stage img, .tuw-lb-stage video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.tuw-lb-cap { color: #d6dde1; padding: 12px 16px 16px; font-size: .95rem; text-align: center; }
.tuw-lb-x, .tuw-lb-nav { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; border-radius: 50%; line-height: 1; }
.tuw-lb-x:hover, .tuw-lb-nav:hover { background: rgba(255,255,255,.28); }
.tuw-lb-x { top: 12px; right: 14px; width: 42px; height: 42px; font-size: 28px; z-index: 2; }
.tuw-lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 36px; padding-bottom: 5px; z-index: 2; }
.tuw-lb-prev { left: 12px; } .tuw-lb-next { right: 12px; }

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

.tuw-lb-stage { position: relative; }
.tuw-lb-stage img.tuw-ph { filter: blur(6px); transition: filter .25s; }
.tuw-lb-stage.tuw-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: tuw-spin .8s linear infinite; pointer-events: none; }
@keyframes tuw-spin { to { transform: rotate(360deg); } }
.tuw-orig { color: #9fd0ec; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .tuw-lb-stage.tuw-busy::after { animation: none; } }
.tuw-desc{margin:-4px 0 16px;color:var(--tu-ink);line-height:1.5;max-width:70ch}

/* Eventi con tante foto: strumenti, momenti, filmstrip */
.tuw-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 14px; position: sticky; top: -20px; z-index: 3; background: #fff; padding: 8px 0; border-bottom: 1px solid var(--tu-line); }
.tuw-flt-g, .tuw-jump { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tuw-jump { max-width: 100%; }
.tuw-chipb { border: 1px solid var(--tu-line); background: #fff; color: var(--tu-ink); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .85rem; cursor: pointer; }
.tuw-chipb:hover { background: #e7eef1; }
.tuw-chipb[aria-pressed="true"] { background: var(--tu-accent); border-color: var(--tu-accent); color: #fff; }
.tuw-sec { margin: 0 0 12px; }
.tuw-mh { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; margin: 0 0 8px; border: 1px solid var(--tu-line); border-radius: 8px; background: var(--tu-panel); color: var(--tu-ink); font: inherit; cursor: pointer; }
.tuw-mh b { font-size: 1rem; }
.tuw-mh span { color: var(--tu-muted); font-size: .88rem; }
.tuw-mh::after { content: "▾"; margin-left: auto; color: var(--tu-muted); }
.tuw-sec:not(.tuw-open) .tuw-mh::after { content: "▸"; }
.tuw-sec:not(.tuw-open) .tuw-mh { margin-bottom: 0; }
.tuw-prev { display: none; gap: 3px; margin-left: 8px; }
.tuw-prev img { width: 44px; height: 33px; object-fit: cover; border-radius: 4px; }
.tuw-sec:not(.tuw-open) .tuw-prev { display: inline-flex; }
.tuw-lb-strip { display: flex; gap: 4px; width: 100%; max-width: 100%; overflow-x: auto; padding: 8px 12px 2px; scrollbar-width: thin; }
.tuw-lb-strip button { position: relative; flex: none; padding: 0; border: 2px solid transparent; border-radius: 4px; background: #222; cursor: pointer; opacity: .6; }
.tuw-lb-strip button img { display: block; width: 72px; height: 54px; object-fit: cover; }
.tuw-lb-strip button span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; text-shadow: 0 1px 4px #000; }
.tuw-lb-strip button.tuw-on { opacity: 1; border-color: #fff; }
@media (max-width: 820px) { .tuw-tools { top: -16px; } .tuw-lb-strip button img { width: 56px; height: 42px; } }
