/* ============================================
   TRIFOCUS UX - SCORE TOOLTIPS
   Interactive tooltips for UX audit scores
   ============================================ */

.score-tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.score-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  font-size: 12px;
  color: var(--gray-400, #94A3B8);
  background: var(--gray-100, #F1F5F9);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.score-tooltip-wrapper:hover .score-tooltip-icon {
  color: var(--brand-navy, #3A4B5C);
  background: var(--gray-200, #E2E8F0);
}

.score-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 1000;
  width: 280px;
  padding: 12px 16px;
  background: var(--gray-800, #1E293B);
  color: var(--white, #FFFFFF);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.score-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gray-800, #1E293B);
}

.score-tooltip-wrapper:hover .score-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-12px);
  pointer-events: auto;
}

.score-tooltip-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #FFFFFF;
}

.score-tooltip-value {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.score-tooltip-value .score-badge {
  font-size: 18px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.score-badge.score-excellent {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

.score-badge.score-good {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
}

.score-badge.score-fair {
  background: rgba(245, 158, 11, 0.2);
  color: #FBBF24;
}

.score-badge.score-poor {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.score-tooltip-description {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.score-tooltip-breakdown {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.score-tooltip-breakdown-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
}

.score-tooltip-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  padding: 3px 0;
}

.score-tooltip-breakdown-item .label {
  color: rgba(255, 255, 255, 0.7);
}

.score-tooltip-breakdown-item .value {
  font-weight: 600;
  color: #FFFFFF;
}

.score-tooltip-action {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
  color: var(--brand-cyan-light, #8A9AAA);
}

[data-score-range="excellent"] .score-indicator {
  background: linear-gradient(135deg, #10B981, #34D399);
}

[data-score-range="good"] .score-indicator {
  background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

[data-score-range="fair"] .score-indicator {
  background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

[data-score-range="poor"] .score-indicator {
  background: linear-gradient(135deg, #EF4444, #F87171);
}

[data-theme="dark"] .score-tooltip-icon {
  color: var(--gray-500, #8A94A4);
  background: var(--gray-700, #2D3340);
}

[data-theme="dark"] .score-tooltip-wrapper:hover .score-tooltip-icon {
  color: var(--gray-300, #C0C8D8);
  background: var(--gray-600, #3A4252);
}

[data-theme="dark"] .score-tooltip {
  background: var(--gray-900, #0F172A);
  border: 1px solid var(--gray-700, #2D3340);
}

[data-theme="dark"] .score-tooltip::after {
  border-top-color: var(--gray-900, #0F172A);
}

.score-tooltip-compact {
  width: 200px;
  padding: 8px 12px;
}

.score-tooltip-compact .score-tooltip-title {
  font-size: 12px;
  margin-bottom: 4px;
}

.score-tooltip-compact .score-tooltip-description {
  font-size: 11px;
}

.score-with-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
