/* web/app/ui/onboarding.css */
/* ✅ FASE 1: Estilos para sistema de Onboarding */

/* ===== OVERLAY ===== */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  animation: onboarding-overlay-fade-in 0.3s ease;
}

@keyframes onboarding-overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===== TOOLTIP ===== */
.onboarding-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 400px;
  background: rgba(31, 41, 55, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(59, 130, 246, 0.5);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: all;
}

.onboarding-tooltip--visible {
  opacity: 1;
  transform: scale(1);
}

.onboarding-tooltip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.onboarding-tooltip__progress {
  flex: 1;
  height: 4px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.onboarding-tooltip__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.onboarding-tooltip__step {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
}

.onboarding-tooltip__content {
  margin-bottom: 20px;
}

.onboarding-tooltip__title {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0 0 8px 0;
}

.onboarding-tooltip__description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.onboarding-tooltip__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.onboarding-tooltip__button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 100px;
}

.onboarding-tooltip__button--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
}

.onboarding-tooltip__button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.onboarding-tooltip__button--secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(59, 130, 246, 0.5);
}

.onboarding-tooltip__button--secondary:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.8);
}

.onboarding-tooltip__button--skip {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: none;
  text-decoration: underline;
  flex: 0 0 auto;
  min-width: auto;
  padding: 10px 12px;
}

.onboarding-tooltip__button--skip:hover {
  color: rgba(255, 255, 255, 0.9);
}

.onboarding-tooltip__button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}

/* ===== HIGHLIGHT ===== */
.onboarding-highlight {
  position: relative;
  z-index: 9997 !important;
  outline: 3px solid rgba(59, 130, 246, 0.8) !important;
  outline-offset: 2px;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.4) !important;
  animation: onboarding-highlight-pulse 2s ease-in-out infinite;
}

@keyframes onboarding-highlight-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.4), 0 0 30px rgba(59, 130, 246, 0.6);
  }
}

/* ===== POSICIONES ===== */
.onboarding-tooltip--top::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(59, 130, 246, 0.5);
}

.onboarding-tooltip--bottom::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(59, 130, 246, 0.5);
}

.onboarding-tooltip--left::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid rgba(59, 130, 246, 0.5);
}

.onboarding-tooltip--right::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid rgba(59, 130, 246, 0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .onboarding-tooltip {
    max-width: calc(100vw - 32px);
    margin: 16px;
    left: 16px !important;
    right: 16px !important;
    transform: none !important;
  }

  .onboarding-tooltip--visible {
    transform: none !important;
  }

  .onboarding-tooltip__actions {
    flex-direction: column;
  }

  .onboarding-tooltip__button {
    width: 100%;
  }

  .onboarding-tooltip__button--skip {
    width: auto;
    align-self: center;
  }
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
  .onboarding-overlay,
  .onboarding-tooltip,
  .onboarding-highlight {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== KEYBOARD NAVIGATION ===== */
.onboarding-tooltip__button:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.8);
  outline-offset: 2px;
}
