/* ============================================
   TOUR MODAL - New User Onboarding
   ============================================ */

.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow: hidden;
}

.tour-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Spotlight effect - light green highlight with shadow overlay */
.tour-spotlight {
  position: absolute;
  background: rgba(144, 238, 144, 0.15);
  border: 3px solid rgba(144, 238, 144, 0.8);
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(144, 238, 144, 0.4),
    inset 0 0 20px rgba(144, 238, 144, 0.1);
  border-radius: 8px;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10001;
}

.tour-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  width: 90%;
  padding: 1.5rem 2rem;
  position: absolute;
  z-index: 10002;
}

.tour-modal.tour-enter {
  animation: tourSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal size variations */
.tour-modal.modal-tall {
  max-width: 420px;
  padding: 1.75rem 2rem;
}

.tour-modal.modal-tall .tour-content {
  min-height: 240px;
}

.tour-modal.modal-wide {
  max-width: 600px;
  padding: 1.25rem 2rem;
}

.tour-modal.modal-wide .tour-content {
  min-height: 120px;
}

.tour-modal.modal-wide .tour-description {
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Arrow pointing to highlighted element */
.tour-arrow {
  position: absolute;
  width: 0;
  height: 0;
  z-index: 10002;
}

.tour-arrow.arrow-left {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 12px solid white;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.tour-arrow.arrow-right {
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 12px solid white;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
}

.tour-arrow.arrow-top {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid white;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.tour-arrow.arrow-bottom {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 12px solid white;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
}

.tour-arrow.arrow-top-right {
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid white;
  top: -12px;
  right: 40px;
}

@keyframes tourSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tourSlideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

.tour-modal.tour-exit {
  animation: tourSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
}

.tour-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s;
}

.tour-close:hover {
  color: var(--gray-700);
}

.tour-content {
  min-height: 200px;
}

.tour-title {
  font-family: 'n27medium', sans-serif;
  font-size: 1.35rem;
  color: var(--gray-900);
  margin-bottom: 0.75rem;
}

.tour-description {
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.tour-description ul {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
}

.tour-description li {
  margin-bottom: 0.5rem;
}

.tour-description strong {
  color: var(--gray-900);
  font-weight: 600;
}

/* Prevent scrolling during tour */
html.tour-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

.tour-progress {
  margin-bottom: 1.25rem;
}

.tour-progress-bar {
  width: 100%;
  height: 5px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tour-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-family: 'n27medium', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.tour-btn-back {
  background: white;
  color: var(--primary);
  border-color: var(--gray-300);
}

.tour-btn-back:hover {
  background: var(--gray-50);
  border-color: var(--primary);
}

.tour-btn-next,
.tour-btn-finish {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tour-btn-next:hover,
.tour-btn-finish:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.tour-btn-skip {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem;
}

.tour-btn-skip:hover {
  color: var(--gray-700);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
  .tour-modal {
    max-width: 95%;
    padding: 1.5rem;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .tour-arrow {
    display: none;
  }

  .tour-title {
    font-size: 1.25rem;
  }

  .tour-description {
    font-size: 0.9rem;
  }

  .tour-actions {
    flex-direction: column-reverse;
  }

  .tour-btn {
    width: 100%;
  }
}
