/**
 * onboarding.css — Resonate Progressive Onboarding
 *
 * Small, non-blocking tooltip cards that surface contextually
 * as the user explores the app for the first time.
 * No full-screen overlay — the app remains fully interactive.
 */

/* =====================================================================
   TIP CARD — floating contextual hint bubble
   ===================================================================== */
.ob-tip {
  position: fixed;
  z-index: 10001;
  width: min(280px, calc(100vw - 32px));
  background: var(--card, #1e2530);
  border: 1px solid var(--surface-border, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  padding: 14px 36px 14px 14px; /* right padding leaves room for the × button */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: var(--fg, #fff);
  pointer-events: all;
  /* Entrance/exit transition */
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.22s ease, transform 0.22s ease;
  will-change: opacity, transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.ob-tip.ob-tip-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =====================================================================
   TIP ARROW — points toward the highlighted target element
   The JS sets --ob-arrow-offset to shift it left/right when the tip
   cannot be perfectly centred on the target.
   ===================================================================== */
.ob-tip-below::before,
.ob-tip-above::before {
  content: '';
  position: absolute;
  left: calc(50% + var(--ob-arrow-offset, 0px));
  transform: translateX(-50%);
  border: 8px solid transparent;
}

/* Arrow points up (tip is below the target) */
.ob-tip-below::before {
  top: -8px;
  border-top: none;
  border-bottom-color: var(--card, #1e2530);
}

/* Arrow points down (tip is above the target) */
.ob-tip-above::before {
  bottom: -8px;
  border-bottom: none;
  border-top-color: var(--card, #1e2530);
}

/* =====================================================================
   CLOSE BUTTON — top-right dismiss (×)
   ===================================================================== */
.ob-tip-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--muted, #b0b8c1);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 5px;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.ob-tip-close:hover,
.ob-tip-close:focus-visible {
  color: var(--fg, #fff);
}

.ob-tip-close:focus-visible {
  outline: 2px solid var(--primary, #3da9ff);
  outline-offset: 2px;
}

/* =====================================================================
   TIP CONTENT — icon, title, body text
   ===================================================================== */
.ob-tip-icon {
  font-size: 22px;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1;
  user-select: none;
}

.ob-tip-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg, #fff);
  margin: 0 0 4px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.01em;
}

.ob-tip-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted, #b0b8c1);
  margin: 0;
  text-align: center;
}

/* =====================================================================
   RESPONSIVE — tiny phones (< 360px wide)
   ===================================================================== */
@media (max-width: 359px) {
  .ob-tip {
    padding: 12px 32px 12px 12px;
    border-radius: 10px;
  }

  .ob-tip-title {
    font-size: 13px;
  }

  .ob-tip-body {
    font-size: 11px;
  }
}
