/**
 * MRANTI Grant Navigator - Onboarding Tour Styles
 * Version: 2.0 - Static Modal-Based Tour
 */

/* Modal Overlay */
.tour-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  padding: 1rem;
}

.tour-modal-overlay.tour-modal-active {
  opacity: 1;
}

/* Modal Container */
.tour-modal-container {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 48rem;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease-in-out;
}

.tour-modal-active .tour-modal-container {
  transform: scale(1);
}

/* Header */
.tour-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.tour-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.tour-modal-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0.25rem 0 0 0;
}

.tour-close-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tour-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Progress Bar */
.tour-progress-container {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.tour-progress-bar {
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.tour-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #1d4ed8);
  border-radius: 9999px;
  transition: width 0.5s ease-in-out;
}

.tour-progress-text {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

/* Steps Container */
.tour-steps-container {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

/* Individual Step */
.tour-step {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  border: 2px solid transparent;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.tour-step:hover {
  background: #f1f5f9;
}

.tour-step-current {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.tour-step-completed {
  background: #f0fdf4;
  opacity: 0.7;
}

.tour-step-completed:hover {
  opacity: 1;
}

/* Step Checkbox */
.tour-step-checkbox {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour-step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.tour-step-current .tour-step-number {
  background: #3b82f6;
  color: white;
}

/* Step Content */
.tour-step-content {
  flex: 1;
  min-width: 0;
}

.tour-step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tour-step-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.tour-step-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.tour-step-description {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.tour-step-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: white;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  color: #1d4ed8;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tour-step-current .tour-step-action {
  background: #dbeafe;
  border-color: #93c5fd;
}

/* Mark Complete Button */
.tour-mark-complete-btn {
  padding: 0.5rem 1rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.tour-mark-complete-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tour-mark-complete-btn:active {
  transform: translateY(0);
}

/* Completed Badge */
.tour-completed-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 0.5rem;
  color: #15803d;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: center;
}

/* Footer */
.tour-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Buttons */
.tour-btn-primary {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(to right, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.tour-btn-secondary {
  padding: 0.75rem 1.5rem;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-btn-secondary:hover {
  background: #e2e8f0;
}

.tour-btn-outline {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: #3b82f6;
  border: 2px solid #3b82f6;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tour-btn-outline:hover {
  background: #eff6ff;
}

/* Completion Celebration */
.tour-completion-celebration {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.tour-completion-icon {
  font-size: 4rem;
  line-height: 1;
  animation: celebration-bounce 0.6s ease-in-out;
}

@keyframes celebration-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.tour-completion-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.tour-completion-message {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
  max-width: 28rem;
}

.tour-completion-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
  .tour-modal-overlay {
    padding: 0.5rem;
  }

  .tour-modal-container {
    border-radius: 0.75rem;
    max-height: 95vh;
  }

  .tour-modal-header {
    padding: 1rem;
  }

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

  .tour-step {
    padding: 0.75rem;
  }

  .tour-completion-icon {
    font-size: 3rem;
  }

  .tour-completion-title {
    font-size: 1.5rem;
  }

  .tour-completion-actions {
    flex-direction: column;
    width: 100%;
  }

  .tour-btn-primary,
  .tour-btn-secondary,
  .tour-btn-outline {
    width: 100%;
  }
}

/* Scrollbar Styling */
.tour-steps-container::-webkit-scrollbar {
  width: 8px;
}

.tour-steps-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.tour-steps-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.tour-steps-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
