/* Enhanced Tour Guide Styles - Improved Design */

.tour-tooltip {
  position: absolute;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%, 
    rgba(248, 250, 252, 0.98) 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 24px;
  padding: 0;
  max-width: 380px;
  min-width: 320px;
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.12),
    0 16px 32px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10001;
  pointer-events: all;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.tour-overlay.active .tour-tooltip {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.dark .tour-tooltip {
  background: linear-gradient(135deg, 
    rgba(31, 41, 55, 0.98) 0%, 
    rgba(17, 24, 39, 0.98) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 
    0 32px 64px rgba(0, 0, 0, 0.25),
    0 16px 32px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
  color: white;
}

.tour-content {
  padding: 32px;
  position: relative;
}

.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.tour-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.dark .tour-title {
  color: #ffffff;
}

.tour-progress {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  flex-shrink: 0;
}

.dark .tour-progress {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: #d1d5db;
  border-color: rgba(75, 85, 99, 0.5);
}

.tour-description {
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 28px;
  font-size: 15px;
  font-weight: 400;
}

.dark .tour-description {
  color: #cbd5e1;
}

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

.tour-navigation {
  display: flex;
  gap: 12px;
}

.tour-btn {
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  min-width: 80px;
  text-align: center;
}

.tour-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.tour-btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 
    0 8px 16px rgba(59, 130, 246, 0.3),
    0 4px 8px rgba(59, 130, 246, 0.2);
}

.tour-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 12px 24px rgba(59, 130, 246, 0.4),
    0 6px 12px rgba(59, 130, 246, 0.3);
}

.tour-btn-primary:active:not(:disabled) {
  transform: translateY(-1px);
}

.tour-btn-secondary {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #64748b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tour-btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dark .tour-btn-secondary {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  color: #d1d5db;
  border-color: rgba(75, 85, 99, 0.5);
}

.dark .tour-btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  color: #f9fafb;
}

/* Enhanced tooltip arrows with better styling */
.tour-tooltip::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border: 12px solid transparent;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.tour-tooltip.top::before {
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  border-top-color: rgba(255, 255, 255, 0.98);
}

.dark .tour-tooltip.top::before {
  border-top-color: rgba(31, 41, 55, 0.98);
}

.tour-tooltip.bottom::before {
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-color: rgba(255, 255, 255, 0.98);
}

.dark .tour-tooltip.bottom::before {
  border-bottom-color: rgba(31, 41, 55, 0.98);
}

.tour-tooltip.left::before {
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  border-left-color: rgba(255, 255, 255, 0.98);
}

.dark .tour-tooltip.left::before {
  border-left-color: rgba(31, 41, 55, 0.98);
}

.tour-tooltip.right::before {
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  border-right-color: rgba(255, 255, 255, 0.98);
}

.dark .tour-tooltip.right::before {
  border-right-color: rgba(31, 41, 55, 0.98);
}

/* Add subtle animation to the tour card */
@keyframes tour-card-entrance {
  0% {
    transform: scale(0.85) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.tour-overlay.active .tour-tooltip {
  animation: tour-card-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Enhanced highlight with better visual feedback */
.tour-highlight {
  position: absolute;
  border: 3px solid #3b82f6;
  border-radius: 20px;
  box-shadow: 
    0 0 0 9999px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(59, 130, 246, 0.8),
    inset 0 0 0 3px rgba(255, 255, 255, 0.3);
  background: transparent;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 10000;
}

.tour-highlight::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: 24px;
  animation: tour-pulse-ring 3s infinite;
}

.tour-highlight::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.15) 0%, 
    rgba(147, 197, 253, 0.15) 50%, 
    rgba(59, 130, 246, 0.15) 100%);
}

@keyframes tour-pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}