/* ═══════════════════════════════════════════════════════════════
   Tooltip — hover/focus reveals explanation
   Usage: <span class="info-tip" data-tip="Text här">Verifierad <i>ⓘ</i></span>
   ═══════════════════════════════════════════════════════════════ */

.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: help;
}
.info-tip i {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: currentColor;
  color: var(--sam-white);
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  opacity: .7;
  font-family: var(--font-body);
}
.info-tip i::before { content: "?"; }

.info-tip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  max-width: 260px;
  min-width: 180px;
  width: max-content;
  padding: 9px 12px;
  background: var(--sam-dark);
  color: #fff;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 100;
}
.info-tip[data-tip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: var(--sam-dark);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s, transform .15s;
  z-index: 100;
}
.info-tip:hover::after,
.info-tip:focus-within::after,
.info-tip:hover::before,
.info-tip:focus-within::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Position variants */
.info-tip--below[data-tip]::after {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
}
.info-tip--below[data-tip]::before {
  bottom: auto;
  top: calc(100% + 2px);
  border-top-color: transparent;
  border-bottom-color: var(--sam-dark);
  transform: translateX(-50%) translateY(-4px);
}
