/* ════════════════════════════════════════
   App-specific: PEBA Palermo — accessibilità immobili
   (si appoggia a map.css per toolbar/legende/pannello/scala/attrib)
════════════════════════════════════════ */

.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}
.legend-row {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #444;
  gap: 0;
  white-space: nowrap;
}
.legend-row + .legend-row { margin-top: 3px; }

.rp-punto-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: #374151;
  white-space: pre-line;
}

/* Griglia foto sopralluogo */
.rp-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.rp-photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(30, 60, 160, 0.14);
  padding: 0;
  background: none;
  cursor: pointer;
}
.rp-photo-thumb-cover {
  grid-column: span 2;
  grid-row: span 2;
}
.rp-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Modale galleria foto */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 14, 30, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.photo-modal[hidden] { display: none; }
.photo-modal-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-modal-img {
  max-width: 88vw;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.2s ease;
}
.photo-modal-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 92vw;
  padding: 10px 6px 4px;
  margin-bottom: 6px;
}
.photo-modal-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  background: none;
  transition: opacity 0.15s, border-color 0.15s;
}
.photo-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-modal-thumb:hover { opacity: 0.85; }
.photo-modal-thumb.active {
  opacity: 1;
  border-color: #fff;
}
.photo-modal-close,
.photo-modal-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
}
.photo-modal-close:hover,
.photo-modal-nav:hover { background: rgba(255, 255, 255, 0.22); }
.photo-modal-close {
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  font-size: 18px;
}
.photo-modal-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 30px;
}
.photo-modal-prev { left: 16px; }
.photo-modal-next { right: 16px; }
.photo-modal-counter {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 12px;
}
.photo-modal-rotate-group {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}
.photo-modal-rotate {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  line-height: 1;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 18px;
}
.photo-modal-rotate:hover { background: rgba(255, 255, 255, 0.22); }

[data-theme="dark"] .rp-punto-note { color: #b7c2e2; }

/* Tooltip hover sui punti PEBA */
.maplibregl-popup-content {
  font-family: 'Titillium Web', 'Segoe UI', system-ui, sans-serif;
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 8px;
}
.mp-title {
  font-weight: 700;
  color: #1e3ca0;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mp-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.mp-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.peba-hover-popup { pointer-events: none; }

[data-theme="dark"] .peba-hover-popup .maplibregl-popup-content {
  background: rgba(10,16,34,0.96);
  box-shadow: 0 4px 20px rgba(0,0,30,0.5);
}
[data-theme="dark"] .peba-hover-popup .maplibregl-popup-tip {
  border-top-color: rgba(10,16,34,0.96);
  border-bottom-color: rgba(10,16,34,0.96);
  border-left-color: rgba(10,16,34,0.96);
  border-right-color: rgba(10,16,34,0.96);
}
[data-theme="dark"] .mp-title { color: #6a90d8; }
