/* AYIO Jobs — Tooltip System
 * The bubble is hidden by default and shown only on hover/focus.
 * Uses !important to prevent any parent styles from overriding display.
 */
.ayio-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
}

.ayio-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f1f3d;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: 'DM Sans', 'Inter', sans-serif;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
}

.ayio-tooltip-icon:hover,
.ayio-tooltip-icon:focus {
  background: #f0a500;
  color: #0f1f3d;
  outline: none;
}

/* Bubble: ALWAYS hidden unless hovered/focused */
.ayio-tooltip-bubble {
  display: none !important;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #0f1f3d;
  border: 1px solid #0f1f3d;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Inter', 'DM Sans', sans-serif;
  line-height: 1.5;
  max-width: 280px;
  min-width: 180px;
  width: max-content;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 99999;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  animation: tooltipFadeIn 0.15s ease;
}

/* Arrow pointing down from bubble */
.ayio-tooltip-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #0f1f3d;
}

/* Show on hover and focus — override the !important hide */
.ayio-tooltip:hover > .ayio-tooltip-bubble,
.ayio-tooltip-icon:focus + .ayio-tooltip-bubble,
.ayio-tooltip.tooltip-active > .ayio-tooltip-bubble {
  display: block !important;
}

@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Near top of page: flip below */
.ayio-tooltip.tooltip-below .ayio-tooltip-bubble {
  bottom: auto;
  top: calc(100% + 8px);
}
.ayio-tooltip.tooltip-below .ayio-tooltip-bubble::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: #0f1f3d;
}

/* Mobile: fixed position overlay */
@media (max-width: 576px) {
  .ayio-tooltip:hover > .ayio-tooltip-bubble,
  .ayio-tooltip-icon:focus + .ayio-tooltip-bubble {
    position: fixed !important;
    bottom: auto !important;
    top: auto !important;
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
    max-width: none !important;
    width: auto !important;
  }
  .ayio-tooltip-bubble::after {
    display: none;
  }
}
