/* Custom styling overrides and scrollbar polish */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hidden {
  display: none !important;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #0B0E14;
}

::-webkit-scrollbar-thumb {
  background: #1E2330;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2D3748;
}

/* Tooltip styles */
.tooltip-trigger {
  cursor: pointer !important;
  text-decoration: none;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
}

.tooltip-trigger:hover,
.tooltip-trigger.active,
.tooltip-trigger.pinned {
  border-bottom-color: #3b82f6;
  color: #60a5fa !important;
}

.tooltip-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 9999px;
  background-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1.5px solid #3b82f6;
  line-height: 1;
  vertical-align: middle;
  margin-left: 4px;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  cursor: pointer !important;
  touch-action: manipulation;
}

.tooltip-trigger:hover .tooltip-info-icon,
.tooltip-trigger.active .tooltip-info-icon,
.tooltip-trigger.pinned .tooltip-info-icon {
  background-color: #3b82f6;
  color: #ffffff;
  border-color: #93c5fd;
  transform: scale(1.15);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* Global Floating Tooltip */
#global-tooltip {
  position: fixed;
  z-index: 99999;
  max-width: 320px;
  min-width: 180px;
  width: max-content;
  background: #151922;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(59, 130, 246, 0.25);
  pointer-events: auto;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  line-height: 1.5;
  transition: opacity 0.15s ease, transform 0.15s ease;
  opacity: 0;
  transform: translateY(3px) scale(0.98);
  display: none;
}

@media (max-width: 480px) {
  #global-tooltip {
    max-width: calc(100vw - 28px);
  }
}

#global-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  display: block;
}

#global-tooltip-arrow {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #151922;
  border: 1px solid #334155;
  transform: rotate(45deg);
  z-index: -1;
}

#global-tooltip.arrow-bottom #global-tooltip-arrow {
  bottom: -5px;
  border-top: none;
  border-left: none;
}

#global-tooltip.arrow-top #global-tooltip-arrow {
  top: -5px;
  border-bottom: none;
  border-right: none;
}
