/* Tri Column Hotspots — frontend */

.tch-wrapper {
  --tch-pin-color: #2563eb;
  --tch-pin-active: #1d4ed8;
  --tch-gap: 1.5rem;
  --tch-radius: 12px;
  --tch-text: #0f172a;
  --tch-muted: #64748b;
  --tch-bg: #ffffff;
  --tch-border: #e2e8f0;
  font-family: inherit;
  color: var(--tch-text);
  max-width: 100%;
  margin: 0 auto 2rem;
}

.tch-grid {
  display: grid;
  grid-template-columns: 25% 50% 25%;
  gap: var(--tch-gap);
  align-items: stretch;
}

.tch-col {
  min-width: 0;
}

.tch-col-left,
.tch-col-right {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1.5rem 1.75rem;
}

.tch-content {
  font-size: 1rem;
  line-height: 1.6;
}

.tch-content h1,
.tch-content h2,
.tch-content h3 {
  margin-top: 0;
  line-height: 1.2;
}

.tch-content p:last-child {
  margin-bottom: 0;
}

.tch-col-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tch-image-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0;
}

.tch-center-image {
  width: 100%;
  height: auto;
  display: block;
  border: none;
  border-radius: 0;
  user-select: none;
  pointer-events: none;
}

.tch-no-image {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--tch-muted);
  background: #f8fafc;
  border-radius: var(--tch-radius);
  font-size: 0.95rem;
}

/* Pins */
.tch-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  border-radius: 50%;
  outline: none;
}

.tch-pin:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45);
}

.tch-pin-dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 7px auto;
  background: var(--tch-pin-color);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.tch-pin-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--tch-pin-color);
  opacity: 0;
  pointer-events: none;
}

.tch-pin.is-active .tch-pin-dot,
.tch-pin:hover .tch-pin-dot {
  transform: scale(1.15);
  background: var(--tch-pin-active);
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.35);
}

.tch-pin.is-active .tch-pin-pulse {
  animation: tch-pulse 2s ease-out infinite;
}

@keyframes tch-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.tch-content.is-updating {
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.tch-error {
  color: #b91c1c;
  padding: 1rem;
  background: #fef2f2;
  border-radius: 8px;
}

/* Tablet */
@media (max-width: 1024px) {
  .tch-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .tch-col-center {
    grid-column: 1 / -1;
    order: -1;
  }

  .tch-image-stage {
    max-width: 360px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .tch-grid {
    grid-template-columns: 1fr;
  }

  .tch-col-left,
  .tch-col-right {
    padding: 1.25rem;
  }

  .tch-image-stage {
    max-width: 100%;
  }
}
