/* PETKA Web — svgzoom + hotspot preview styles.
 * Layered on top of /style.css; reuses its custom-property palette. */

/* ── Pan/zoom wrapper ───────────────────────────────────────────────── */
.svgzoom-wrapper {
  position: absolute;
  top: 0; left: 0;
  transform-origin: 0 0;
  will-change: transform;
  /* Prevents native gesture handling on touch so we can implement pinch ourselves. */
  touch-action: none;
}

.svgzoom-host {
  /* The container we attach to becomes a viewport that clips the transformed wrapper. */
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  background: var(--surface, #fff);
  border-radius: 3px;
}

.svgzoom-cursor-grab   { cursor: grab; }
.svgzoom-cursor-grabbing { cursor: grabbing; }
.svgzoom-cursor-grab:active { cursor: grabbing; }

/* ── Toolbar (zoom controls) ────────────────────────────────────────── */
.svgzoom-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e4ec);
  border-radius: 6px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 5;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.svgzoom-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text, #1a1d24);
  width: 28px; height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  padding: 0;
  line-height: 1;
  transition: background .12s, border-color .12s;
}
.svgzoom-toolbar button:hover {
  background: var(--accent-soft, #eaf2ff);
  border-color: var(--accent, #1a73e8);
}
.svgzoom-toolbar button:active { transform: translateY(1px); }
.svgzoom-toolbar .zoom-readout {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; padding: 0 6px;
  font-size: 11px; color: var(--text-muted, #6b7280);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  user-select: none;
}

/* ── Hotspot tooltip ────────────────────────────────────────────────── */
.hotspot-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: var(--surface, #ffffff);
  color: var(--text, #1a1d24);
  border: 1px solid var(--border, #e2e4ec);
  border-radius: 6px;
  padding: 8px 10px;
  font: 12px/1.4 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18), 0 1px 3px rgba(0,0,0,0.10);
  min-width: 180px;
  max-width: 280px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .12s ease-out, transform .12s ease-out;
}
.hotspot-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}
.hotspot-tooltip .htt-head {
  display: flex; align-items: baseline; gap: 8px;
  border-bottom: 1px solid var(--border, #e2e4ec);
  padding-bottom: 5px; margin-bottom: 6px;
}
.hotspot-tooltip .htt-callout {
  font-weight: 700;
  color: var(--gold, #d4a017);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
}
.hotspot-tooltip .htt-name {
  color: var(--text, #1a1d24);
  font-weight: 600;
  font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.hotspot-tooltip .htt-loading {
  color: var(--text-muted, #6b7280);
  font-style: italic;
  font-size: 11px;
}
.hotspot-tooltip .htt-empty {
  color: var(--text-muted, #6b7280);
  font-size: 11px;
}
.hotspot-tooltip ul.htt-pns {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.hotspot-tooltip ul.htt-pns li {
  display: flex; gap: 6px;
  font-size: 11px;
  line-height: 1.35;
}
.hotspot-tooltip ul.htt-pns code {
  color: var(--accent, #1a73e8);
  font-weight: 600;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  white-space: nowrap;
}
.hotspot-tooltip ul.htt-pns .htt-pn-name {
  color: var(--text-muted, #6b7280);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.hotspot-tooltip .htt-more {
  font-size: 10px; color: var(--text-muted, #6b7280);
  margin-top: 4px; font-style: italic;
}
.hotspot-tooltip .htt-hint {
  font-size: 10px; color: var(--text-muted, #6b7280);
  margin-top: 4px; border-top: 1px dashed var(--border, #e2e4ec); padding-top: 4px;
}
