/* Tooltip component styles using CSS variables from App.module.css */

.tooltipContainer {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  /* Ensure tooltip positioning context */
  z-index: 1;
}

.tooltipIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background-color: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-size: var(--font-size-xs);
  font-weight: bold;
  cursor: help;
  transition: all 0.2s ease;
  user-select: none;
}

.tooltipIcon:hover {
  background-color: var(--color-text);
  transform: scale(1.1);
}

/* Hover tooltip */
.hoverTooltip {
  position: absolute;
  top: auto;
  bottom: calc(100% + var(--spacing-xs));
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: var(--font-size-sm);
  z-index: var(--z-tooltip);
  max-width: 300px;
  word-wrap: break-word;
  white-space: normal;
  /* Ensure tooltip doesn't get clipped by containers */
  pointer-events: none;
  /* Prevent text selection */
  user-select: none;
}

.hoverTooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--color-bg-secondary);
  /* Ensure arrow is also on top */
  z-index: calc(var(--z-tooltip) + 1);
  pointer-events: none;
}

/* Fixed positioned tooltip for better visibility */
.hoverTooltipFixed {
  position: fixed;
  transform: translateX(-50%) translateY(-100%);
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-size: var(--font-size-sm);
  z-index: var(--z-tooltip);
  max-width: 300px;
  word-wrap: break-word;
  white-space: normal;
  pointer-events: none;
  user-select: none;
  border: 1px solid var(--color-border);
  margin-top: -8px;
}

.hoverTooltipFixed::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--color-bg-secondary);
  z-index: calc(var(--z-tooltip) + 1);
  pointer-events: none;
}

.tooltipTitle {
  font-weight: bold;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-highlight);
}

.tooltipDescription {
  margin-bottom: var(--spacing-xs);
  line-height: 1.4;
}

.tooltipHint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Modal content styling */
.modalContent {
  line-height: 1.6;
}

.modalDescription {
  margin-bottom: var(--spacing-lg);
  color: var(--color-text);
}

.modalSection {
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-md);
  background-color: var(--color-bg-light);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
}

.modalSectionTitle {
  font-weight: bold;
  margin-bottom: var(--spacing-sm);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.modalSectionContent {
  color: var(--color-text);
  line-height: 1.5;
}

.modalLinks {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.modalLink {
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: color 0.2s ease;
}

.modalLink:hover {
  color: var(--color-text-highlight);
  text-decoration: underline;
}