/* ═══════════════════════════════════
   INTERACTIVE SCREENSHOTS
   ═══════════════════════════════════ */
.interactive-screenshot {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: var(--space-6) 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: visible;
  background: var(--color-white);
  box-shadow: var(--shadow-brand);
}

.interactive-screenshot__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.interactive-screenshot__hint {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-3);
  background: var(--color-primary-light);
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ═══════════════════════════════════
   HOTSPOT MARKERS
   ═══════════════════════════════════ */
.hotspot {
  position: absolute;
  left: var(--hotspot-x);
  top: var(--hotspot-y);
  transform: translate(-50%, -50%);
  z-index: 2;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.hotspot__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-medium));
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 2;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.hotspot:hover .hotspot__dot {
  transform: scale(1.15);
  background: var(--color-primary-dark);
}

.hotspot.is-active .hotspot__dot {
  background: var(--color-primary-dark);
  transform: scale(1.1);
}

.hotspot__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.25;
  animation: hotspotPulse 2.5s ease-in-out infinite;
  z-index: 1;
}

.hotspot.is-active .hotspot__pulse {
  animation: none;
  opacity: 0;
}

@keyframes hotspotPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.25;
  }
  50% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* ═══════════════════════════════════
   HOTSPOT TOOLTIPS
   ═══════════════════════════════════ */
.hotspot-tooltip {
  display: none;
  position: absolute;
  width: 300px;
  padding: var(--space-4) var(--space-5);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 10;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.hotspot-tooltip.is-visible {
  display: block;
  animation: tooltipFadeIn var(--transition-fast) ease;
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hotspot-tooltip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.hotspot-tooltip h4 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  margin: 0;
  color: var(--color-primary);
}

.hotspot-tooltip__close {
  padding: var(--space-1);
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  line-height: 1;
}

.hotspot-tooltip__close:hover {
  color: var(--color-text);
  background: var(--color-bg-hover);
}

.hotspot-tooltip p {
  margin-bottom: var(--space-2);
  color: var(--color-text-secondary);
}

.hotspot-tooltip p:last-child {
  margin-bottom: 0;
}

.hotspot-tooltip a {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

/* Tooltip arrow - points toward hotspot */
.hotspot-tooltip::before {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-top: 2px solid var(--color-border);
  border-left: 2px solid var(--color-border);
  transform: rotate(45deg);
}

.hotspot-tooltip.tooltip--right::before {
  left: -6px;
  top: 16px;
}

.hotspot-tooltip.tooltip--left::before {
  right: -6px;
  top: 16px;
  transform: rotate(-135deg);
}

/* ═══════════════════════════════════
   CONTEXT HELP BUTTON (pulsating)
   ═══════════════════════════════════ */
.context-help-btn {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-medium));
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  box-shadow: var(--shadow-brand);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
}

.context-help-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  transform: translate(2px, -2px);
  box-shadow: var(--shadow-brand-hover);
}

.context-help-btn__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: contextPulse 2s ease-in-out infinite;
}

@keyframes contextPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.context-help-btn__tooltip {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  right: 0;
  background: var(--color-text);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.context-help-btn:hover .context-help-btn__tooltip {
  opacity: 1;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 600px) {
  .hotspot-tooltip {
    width: 240px;
    padding: var(--space-3) var(--space-4);
  }

  .hotspot__dot {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .context-help-btn {
    bottom: var(--space-4);
    right: var(--space-4);
    padding: var(--space-2) var(--space-4);
  }
}
