/* Professional Metric Info Popover Styles - Shared Component */

.metric-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  width: 400px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(16px);
  border-top: 4px solid;
}

.popover-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popover-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
  .metric-popover {
    width: 340px;
    max-width: 90vw;
    max-height: 80vh;
  }
}

.metric-popover.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.metric-popover .close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  transition: all 0.2s ease;
}

.metric-popover .close-btn:hover {
  background: #e2e8f0;
  color: #475569;
  transform: scale(1.05);
}

.metric-popover h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 40px;
}

.metric-popover h3 i {
  font-size: 20px;
}

.metric-popover p {
  margin: 0 0 16px 0;
  line-height: 1.6;
  color: #475569;
}

.metric-popover .formula {
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  margin: 16px 0;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #16a34a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  color: #166534;
  font-weight: 500;
}

.metric-popover .benchmark {
  background: linear-gradient(145deg, #fefbf0 0%, #fef3c7 100%);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  margin: 16px 0;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  color: #92400e;
  font-weight: 500;
}

.metric-popover .benchmark::before {
  content: "📊 ";
  margin-right: 4px;
}

.metric-popover .formula::before {
  content: "🔬 ";
  margin-right: 4px;
}
