/* ============================================================
   tour.css — Tour guiado de primer acceso (coach-marks) del portal empresa.
   Motor: js/tour-engine.js. Sin librerías externas.
   ============================================================ */

/* Capa que atrapa los clicks: durante el tour la página no es interactiva;
   solo funcionan los botones del tooltip. El oscurecido lo pone .tour-hole. */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: transparent;
  cursor: default;
}

/* El "reflector": un rectángulo transparente sobre el elemento resaltado; el
   box-shadow gigante oscurece TODO lo de afuera. pointer-events:none para no
   tapar nada (los clicks igual los come .tour-overlay de abajo). */
.tour-hole {
  position: fixed;
  z-index: 100001;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.72),
              0 0 0 2px var(--accent, #5DCAA5),
              0 0 22px 4px rgba(93, 202, 165, 0.35);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* El globito con el texto del paso. */
.tour-tooltip {
  position: fixed;
  z-index: 100002;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--primary, #0F172A);
  color: var(--text-main, #F1F5F9);
  border: 1px solid var(--accent-glow, rgba(93, 202, 165, 0.3));
  border-radius: 16px;
  padding: 1.15rem 1.25rem 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip.centered {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
}

.tour-tooltip h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main, #F1F5F9);
}

.tour-tooltip p {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted, #94A3B8);
}

.tour-tip-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tour-count {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted, #94A3B8);
  letter-spacing: 0.03em;
}

.tour-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tour-btn {
  border: none;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
  font-family: inherit;
}

.tour-btn-primary {
  background: var(--accent, #5DCAA5);
  /* Texto oscuro fijo: --primary se vuelve blanco en modo claro y daba
     bajo contraste (~3.9:1) sobre el teal. Casi-negro contrasta bien en
     ambos temas (mismo criterio que los CTA de los modales de bienvenida). */
  color: #04140f;
}
.tour-btn-primary:hover { opacity: 0.9; }

.tour-btn-ghost {
  background: transparent;
  color: var(--text-muted, #94A3B8);
  padding: 0.5rem 0.35rem;
}
.tour-btn-ghost:hover { color: var(--text-main, #F1F5F9); }

/* Flechita que apunta al elemento (se orienta desde el JS con data-placement). */
.tour-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--primary, #0F172A);
  border: 1px solid var(--accent-glow, rgba(93, 202, 165, 0.3));
  transform: rotate(45deg);
}
.tour-tooltip[data-placement="top"]    .tour-arrow { bottom: -7px; border-top: none;  border-left: none;  }
.tour-tooltip[data-placement="bottom"] .tour-arrow { top: -7px;    border-bottom: none; border-right: none; }
.tour-tooltip[data-placement="left"]   .tour-arrow { right: -7px;  border-bottom: none; border-left: none;  }
.tour-tooltip[data-placement="right"]  .tour-arrow { left: -7px;   border-top: none;   border-right: none; }
.tour-tooltip.centered .tour-arrow { display: none; }

/* Modo claro: el reflector oscurece igual (un spotlight es oscuro en ambos
   temas), pero la flecha usa el fondo del tooltip que ya viene por variable. */
.light-mode .tour-hole {
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55),
              0 0 0 2px var(--accent, #0D9488),
              0 0 22px 4px rgba(13, 148, 136, 0.3);
}

@media (max-width: 640px) {
  .tour-tooltip { width: calc(100vw - 24px); }
}
