.ui-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(280px, calc(100vw - 24px));
  padding: 7px 10px;
  border: 1px solid var(--tooltip-border, rgba(129, 159, 141, 0.34));
  border-radius: 9px;
  background: var(--tooltip-bg, rgba(23, 35, 46, 0.95));
  color: var(--tooltip-text, #c8ffdd);
  box-shadow: 0 14px 34px rgba(7, 13, 20, 0.32);
  font:
    600 12px/1.25 Inter,
    Arial,
    sans-serif;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -4px, 0);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.ui-tooltip.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.ui-tooltip::after {
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid var(--tooltip-border, rgba(129, 159, 141, 0.34));
  border-bottom: 1px solid var(--tooltip-border, rgba(129, 159, 141, 0.34));
  background: var(--tooltip-bg, rgba(23, 35, 46, 0.95));
  content: "";
}

.ui-tooltip[data-placement="top"]::after {
  bottom: -5px;
  transform: translateX(-50%) rotate(45deg);
}

.ui-tooltip[data-placement="bottom"] {
  transform: translate3d(-50%, 4px, 0);
}

.ui-tooltip[data-placement="bottom"].is-visible {
  transform: translate3d(-50%, 0, 0);
}

.ui-tooltip[data-placement="bottom"]::after {
  top: -5px;
  transform: translateX(-50%) rotate(225deg);
}

body.terminal-page,
body {
  --tooltip-bg: rgba(23, 35, 46, 0.96);
  --tooltip-border: rgba(129, 159, 141, 0.42);
  --tooltip-text: var(--terminal-text, var(--avr-text, #c8ffdd));
}

.oscilloscope-info-tooltip {
  padding: 6px 9px;
  border: 1px solid var(--tooltip-border, rgba(129, 159, 141, 0.34));
  border-radius: 8px;
  background: var(--tooltip-bg, rgba(23, 35, 46, 0.95));
  color: var(--tooltip-text, #c8ffdd);
  box-shadow: 0 12px 28px rgba(7, 13, 20, 0.26);
  font:
    600 11px/1.25 Inter,
    Arial,
    sans-serif;
}
