/* Tutorial overlay del cotizador — spotlight + tooltip animado.
   Activo solo si el usuario nunca lo vio (localStorage 'cot_tutorial_visto_v1').
   Reactivable desde el footer con "Ver tutorial".
*/

.cot-tut-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: auto;
  background: transparent;
  transition: opacity 220ms ease;
  opacity: 0;
}
.cot-tut-overlay.is-on { opacity: 1; }

/* El "hueco" del spotlight: un div absoluto con box-shadow inverso gigante */
.cot-tut-hole {
  position: absolute;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(8, 15, 32, 0.72);
  transition: top 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              left 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              width 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              height 380ms cubic-bezier(0.32, 0.72, 0.2, 1);
  pointer-events: none;
}
.cot-tut-hole.is-fast,
.cot-tut-ring.is-fast,
.cot-tut-card.is-fast { transition: none !important; }

/* Ring pulsante alrededor del target */
.cot-tut-ring {
  position: absolute;
  border-radius: 16px;
  border: 2px solid #60a5fa;
  pointer-events: none;
  transition: top 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              left 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              width 380ms cubic-bezier(0.32, 0.72, 0.2, 1),
              height 380ms cubic-bezier(0.32, 0.72, 0.2, 1);
  animation: cot-tut-pulse 1.4s ease-in-out infinite;
}
@keyframes cot-tut-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.45); }
  50%      { box-shadow: 0 0 0 14px rgba(96, 165, 250, 0); }
}

/* Tooltip */
.cot-tut-card {
  position: absolute;
  z-index: 9999;
  max-width: min(380px, calc(100vw - 2rem));
  background: #ffffff;
  border-radius: 14px;
  padding: 1.125rem 1.25rem 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.05);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cot-tut-card.is-on {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.cot-tut-card-counter {
  display: inline-block;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.5rem;
}
.cot-tut-card h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
  color: #0f172a;
  line-height: 1.25;
}
.cot-tut-card p {
  margin: 0 0 0.875rem;
  color: #334155;
}
.cot-tut-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.625rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}
.cot-tut-card-actions-right {
  display: flex;
  gap: 0.375rem;
  align-items: center;
}
.cot-tut-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.4375rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 120ms ease;
}
.cot-tut-btn:hover { background: #f1f5f9; }
.cot-tut-btn-skip { color: #64748b; font-weight: 500; }
.cot-tut-btn-prev { color: #475569; }
.cot-tut-btn-next {
  background: #2563eb;
  color: #fff;
}
.cot-tut-btn-next:hover { background: #1d4ed8; }
.cot-tut-card-dots {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.cot-tut-card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background-color 200ms ease, transform 200ms ease;
}
.cot-tut-card-dot.is-current {
  background: #2563eb;
  transform: scale(1.4);
}

/* Boton del footer "Ver tutorial" */
.cot-tut-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: transparent;
  border: 1px solid var(--cot-border, #e5e7eb);
  color: #475569;
  padding: 0.4375rem 0.875rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.cot-tut-replay-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* Footer del cotizador */
.cot-foot {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--cot-border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: #64748b;
}

@media (max-width: 560px) {
  .cot-tut-card { max-width: calc(100vw - 1.5rem); }
  .cot-tut-card-actions-right { gap: 0.25rem; }
  .cot-tut-btn { padding: 0.4375rem 0.625rem; font-size: 0.8125rem; }
  .cot-foot { padding: 0.875rem 1rem; }
}
