/* =========================================================
   iFody — Tour de primeiro acesso (coach marks)
   Carregado só em home / PLP / busca / PDP / carrinho
   (ver inc/enqueue.php). Markup gerado por assets/js/tour.js.

   Camadas: acima do header e drawers (z 200), ABAIXO do
   age gate (z 1000) — o 18+ sempre vence.
   ========================================================= */

.ifody-tour {
  position: fixed;
  inset: 0;
  z-index: 900;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.ifody-tour.is-in { opacity: 1; }

/* Spotlight: o box-shadow gigante escurece tudo em volta do alvo,
   deixando o elemento real visível no "buraco". */
.ifody-tour__hole {
  position: fixed;
  border-radius: var(--r);
  box-shadow: 0 0 0 200vmax rgba(15, 10, 26, .8);
  outline: 2px solid rgba(var(--pink-rgb), .9);
  outline-offset: 3px;
  pointer-events: none;
  transition: top .35s var(--ease), left .35s var(--ease),
              width .35s var(--ease), height .35s var(--ease);
  animation: ifody-tour-pulse 1.6s ease-in-out infinite;
}
@keyframes ifody-tour-pulse {
  0%, 100% { outline-color: rgba(var(--pink-rgb), .9); outline-offset: 3px; }
  50%      { outline-color: rgba(var(--pink-rgb), .35); outline-offset: 6px; }
}

/* Balão */
.ifody-tour__bubble {
  position: fixed;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  transition: top .35s var(--ease), left .35s var(--ease);
}
.ifody-tour__dots { display: flex; gap: 5px; margin-bottom: 10px; }
.ifody-tour__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
  transition: background .2s var(--ease);
}
.ifody-tour__dot--on { background: var(--pink); }
.ifody-tour__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.ifody-tour__text {
  font-size: 13.5px;
  color: var(--text-2);
  margin-bottom: 14px;
}
.ifody-tour__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ifody-tour__skip {
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  padding: 8px 0;
}
.ifody-tour__next {
  padding: 10px 20px;
  font-size: 14px;
}

/* Enquanto o tour roda, o snackbar do PWA espera a vez dele —
   senão o primeiro acesso vira empilhamento de UI. */
.ifody-tour-active #pwa-snackbar { display: none !important; }

/* Aba de ajuda "?" — re-executa o tour da tela. Fica na borda direita,
   meia altura: o rodapé mobile já está lotado (bottombar + stickies de
   PLP/cart/checkout/PDP + snackbar do PWA). */
.ifody-tour-fab {
  position: fixed;
  right: 0;
  top: 58%;
  z-index: 60;
  width: 34px;
  height: 44px;
  border-radius: 12px 0 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-right: 0;
  color: var(--text-2);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -4px 4px 14px rgba(0, 0, 0, .3);
}
.ifody-tour-fab[hidden] { display: none; }
/* Some enquanto o próprio tour roda. */
.ifody-tour-active .ifody-tour-fab { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ifody-tour,
  .ifody-tour__hole,
  .ifody-tour__bubble { transition: none; animation: none; }
}

/* Tour é 100% mobile — o JS já não roda em desktop, isto é só cinto
   e suspensório (ex.: rotação/resize atravessando o breakpoint). */
@media (min-width: 981px) {
  .ifody-tour,
  .ifody-tour-fab { display: none; }
}
