/**
 * Preserve Gold - Shared Tooltip Styles
 * Reusable tooltip styles for all D3.js charts
 */

/* Global tooltip container */
.preserve-gold-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 99999 !important;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 160px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.preserve-gold-tooltip.show {
  opacity: 1;
}

/* Tooltip content styling */
.preserve-gold-tooltip .tooltip-date {
  font-weight: 600;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.preserve-gold-tooltip .tooltip-value {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.preserve-gold-tooltip .tooltip-symbol {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

.preserve-gold-tooltip .tooltip-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.preserve-gold-tooltip .tooltip-change.positive {
  color: #10b981;
}

.preserve-gold-tooltip .tooltip-change.negative {
  color: #ef4444;
}

/* Interactive dots for charts */
.dot {
  pointer-events: all !important;
  cursor: pointer !important;
  z-index: 9999 !important;
  position: relative !important;
  fill: transparent !important;
  stroke: transparent !important;
  opacity: 0 !important;
  transition: all 0.2s ease;
}

.dot:hover {
  fill: white !important;
  stroke: #ffa500 !important;
  stroke-width: 3 !important;
  opacity: 1 !important;
}

/* Ensure circles are above any pseudo-elements */
svg .dot {
  z-index: 9999 !important;
  position: relative !important;
  pointer-events: auto !important;
}

/* Disable pointer events on pseudo-elements that might interfere */
*::before,
*::after {
  pointer-events: none !important;
  z-index: 1 !important;
}

.individual-asset-cards-area *::before,
.individual-asset-cards-area *::after,
.portfolio-asset-result-card *::before,
.portfolio-asset-result-card *::after,
.chart-container *::before,
.chart-container *::after {
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Ensure SVG elements can receive pointer events */
svg,
svg * {
  pointer-events: auto !important;
  z-index: 100 !important;
}

/* Crosshair overlay styles - must be on top of everything */
.pg-hover-overlay,
.cape-hover-overlay {
  pointer-events: all !important;
  z-index: 10000 !important;
  cursor: crosshair !important;
}

.pg-hover-line,
.cape-hover-line {
  pointer-events: none !important;
  z-index: 9999 !important;
}

/* Interactive circles should be above the hover overlay */
.dot {
  z-index: 10001 !important;
  pointer-events: all !important;
}
