/* =========================================================
   File: css/tooltips.css
   Title: Tooltips (Bootstrap + CSS-only text tooltips)
   Version: 2026-02-10
   Update: tooltip text set to font-weight 600
   Notes:
   • Bootstrap tooltip theming
   • Industry tooltip trigger button styles
   • CSS-only text tooltip (.tt) using data-tooltip
   • Pane-left hard override to prevent “top of screen” positioning bugs
========================================================= */


/* ---------------------------------------------------------
   01) BOOTSTRAP TOOLTIP THEME
--------------------------------------------------------- */
.tooltip {
  --bs-tooltip-bg: #808080;
  --bs-tooltip-color: #fff;
  --bs-tooltip-opacity: 1;

  pointer-events: none;
}

.tooltip .tip-title {
  font-weight: 800;
  line-height: 1.1;
}

.tooltip .tip-value {
  opacity: 1;
  margin-top: 0.15rem;
  line-height: 1.1;
}

.tooltip .tooltip-inner {
  background-color: var(--bs-tooltip-bg);
  color: var(--bs-tooltip-color);
  max-width: 240px;
  text-align: center;
  font-weight: 600;
}

/* Placements (Bootstrap uses different borders per side) */
.bs-tooltip-top .tooltip-arrow::before    { border-top-color: #808080; }
.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: #808080; }
.bs-tooltip-start .tooltip-arrow::before  { border-left-color: #808080; }
.bs-tooltip-end .tooltip-arrow::before    { border-right-color: #808080; }


/* ---------------------------------------------------------
   02) INDUSTRY TIP TRIGGER (button wrapper for images)
--------------------------------------------------------- */
.industry-tip {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  cursor: pointer;
}

.industry-tip img {
  display: block;
  width: 100%;
  height: auto;
}


/* ---------------------------------------------------------
   03) CSS-ONLY TEXT TOOLTIP (.tt)
   Usage: <span class="tt" data-tooltip="...">text</span>
--------------------------------------------------------- */
.tt {
  position: relative;
  display: inline-block;
  overflow: visible;
  z-index: 10;

  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.tt:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Bubble (above trigger) */
.tt::after {
  content: attr(data-tooltip);
  position: absolute;

  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);

  display: block;
  z-index: 99999;

  width: max-content;
  max-width: 320px;

  padding: 8px 10px;
  border-radius: 8px;

  background: #808080;
  color: #fff;

  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Arrow */
.tt::before {
  content: "";
  position: absolute;

  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);

  z-index: 99999;

  border: 6px solid transparent;
  border-top-color: #808080;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tt:hover::after,
.tt:focus::after,
.tt:hover::before,
.tt:focus::before {
  opacity: 1;
  visibility: visible;
}


/* ---------------------------------------------------------
   04) PANE-LEFT SAFETY OVERRIDES
   Purpose: prevent conflicts that cause tooltips to jump to
   the top of screen
--------------------------------------------------------- */
.pane-left .tt {
  position: relative !important;
  display: inline !important;
  overflow: visible !important;

  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.pane-left .tt:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Bubble: directly above trigger */
.pane-left .tt::after {
  content: attr(data-tooltip) !important;

  position: absolute !important;
  top: auto !important;
  right: auto !important;

  left: 50% !important;
  bottom: calc(100% + 8px) !important;
  transform: translateX(-50%) !important;

  z-index: 99999 !important;
  display: block !important;

  width: max-content !important;
  max-width: 320px !important;

  padding: 8px 10px !important;
  border-radius: 8px !important;

  background: #808080 !important;
  color: #fff !important;

  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  white-space: normal !important;

  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Arrow */
.pane-left .tt::before {
  content: "" !important;

  position: absolute !important;
  top: auto !important;
  right: auto !important;

  left: 50% !important;
  bottom: calc(100% + 2px) !important;
  transform: translateX(-50%) !important;

  z-index: 99999 !important;

  border: 6px solid transparent !important;
  border-top-color: #808080 !important;

  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pane-left .tt:hover::after,
.pane-left .tt:focus::after,
.pane-left .tt:hover::before,
.pane-left .tt:focus::before {
  opacity: 1 !important;
  visibility: visible !important;
}


/* =========================================================
   END OF FILE — css/tooltips.css
========================================================= */