/* Tour System CSS - Pelagic App - Enhanced Appearance */

.tour-tooltip {
  position: fixed !important;
  z-index: 2010 !important;
  background: white;
  border-radius: 12px;
  padding: 0;
  max-width: 360px;
  width: 360px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  font-family: 'Inter', sans-serif;
  pointer-events: auto !important;
  opacity: 0;
  transition: all 0.2s ease;
  /* Remove conflicting transform and animation */
}

@keyframes tooltipEnter {
  to {
    opacity: 1;
    /* Remove transform from animation */
  }
}

.tour-content {
  padding: 24px;
}

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

.tour-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  flex: 1;
}

.tour-progress {
  font-size: 12px;
  color: #666;
  background: #f3f4f6;
  padding: 4px 8px;
  border-radius: 12px;
  margin-left: 12px;
}

.tour-text {
  margin: 0 0 24px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #4b5563;
}

.tour-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.tour-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

.tour-skip {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.tour-skip:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: #374151;
}

.tour-next {
  background: #0ea5e9;
  color: white;
  border: 1px solid #0ea5e9;
}

.tour-next:hover {
  background: #0284c7;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.tour-upgrade {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  font-weight: 600;
  padding: 12px 24px;
}

.tour-upgrade:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  filter: brightness(1.05);
}

/* Welcome Step Styling */
.tour-tooltip.welcome-step {
  max-width: 450px;
  width: 450px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white;
  border: none;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

/* Final Step (Upgrade) Styling - Make it larger */
.tour-tooltip.final-step {
  max-width: 450px !important;
  width: 450px !important;
  z-index: 2002;
}

/* Larger pro preview for final step */
.tour-tooltip.final-step .tour-pro-preview {
  margin: 20px 0;
  padding: 20px;
}

.tour-tooltip.final-step .tour-pro-screenshot {
  height: 160px;  /* Increased from 120px */
  font-size: 14px;  /* Larger text */
  margin-bottom: 16px;
}

.tour-tooltip.final-step .tour-pro-features {
  grid-template-columns: 1fr 1fr;
  gap: 6px;  /* Increased gap */
  font-size: 14px;  /* Larger font */
  font-weight: 500;
}

.tour-tooltip.final-step .tour-pro-feature {
  padding: 6px 0;  /* Add some padding */
  gap: 8px;  /* Increased gap */
}

.tour-tooltip.final-step .tour-pro-feature::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
  font-size: 14px;  /* Larger checkmark */
}

.tour-welcome-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.tour-logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.5px;
}

.tour-welcome-subtitle {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.tour-tooltip.welcome-step .tour-title {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tour-tooltip.welcome-step .tour-text {
  color: rgba(255, 255, 255, 0.95);
}

.tour-tooltip.welcome-step .tour-progress {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tour-tooltip.welcome-step .tour-skip {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.tour-tooltip.welcome-step .tour-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.tour-tooltip.welcome-step .tour-next {
  background: rgba(255, 255, 255, 0.95);
  color: #667eea;
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.tour-tooltip.welcome-step .tour-next:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Pro Preview Content */
.tour-pro-preview {
  margin: 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: opacity 0.2s ease, height 0.2s ease;
  opacity: 0;
}

.tour-pro-preview[style*="display: block"] {
  opacity: 1;
}

.tour-pro-screenshot {
  width: 100%;
  height: 120px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.tour-pro-screenshot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.05) 3px, transparent 3px);
}

.tour-pro-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
  color: #4b5563;
}

.tour-pro-feature {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tour-pro-feature::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
  font-size: 10px;
}

/* Highlight effect for target elements */
.tour-highlight {
  position: relative !important;
  z-index: 1999 !important;
  border-radius: 6px !important;
  box-shadow: 0 0 0 3px rgba(54, 209, 220, 0.6) !important;
  transition: box-shadow 0.3s ease !important;
}

/* Special highlighting for search container */
.search-container.tour-highlight {
  box-shadow: 0 0 0 4px #36d1dc !important;
  border-radius: 12px !important;
  background: white !important;
  position: relative !important;
}

.search-container.tour-highlight::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(54, 209, 220, 0.1) !important;
  border-radius: 12px !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Special highlighting for hamburger menu */
.hamburger-menu.tour-highlight {
  background-color: rgba(54, 209, 220, 0.1) !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 4px #36d1dc !important;
}

/* Special highlighting for side panel (desktop menu) */
.side-panel.tour-highlight {
  box-shadow: inset 3px 0 0 0 rgba(54, 209, 220, 0.8) !important;
  background-color: rgba(54, 209, 220, 0.05) !important;
  border-radius: 0 !important;
}

/* Special highlighting for legend section */
.legend-section.tour-highlight {
  background-color: rgba(54, 209, 220, 0.05) !important;
  border-radius: 8px !important;
}

/* Map center highlight (circular) - remove conflicting box-shadow */
#map.tour-highlight {
  box-shadow: none !important;
  z-index: auto !important;
}

/* Special highlighting for weather widget */
.live-weather-box.tour-highlight {
  position: absolute !important;  /* Keep absolute, don't change to relative */
  z-index: 2001 !important;  /* Above everything except tooltip */
  box-shadow: 0 0 0 4px #36d1dc !important;
  border-radius: 12px !important;
}

/* Ensure tooltip stays above everything */
.tour-tooltip.final-step {
  max-width: 420px;
  z-index: 2002;
}

/* Animation for step transitions */
.tour-tooltip.transitioning {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.2s ease;
}

/* Pulse animation for highlighted elements */
@keyframes tourPulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(54, 209, 220, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(54, 209, 220, 0.3);
  }
}

.tour-highlight.pulse {
  animation: tourPulse 2s infinite;
}

/* ========================================
   MOBILE RESPONSIVE - COMPLETE
   ======================================== */

@media (max-width: 768px) {
  .tour-tooltip {
    max-width: 75vw !important;
    width: 75vw !important;
  }
  
  .tour-content {
    padding: 20px;
  }
  
  .tour-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .tour-title {
    font-size: 18px;  /* Increased from 16px */
  }
  
  .tour-progress {
    display: none !important;
  }
  
  .tour-text {
    font-size: 15px;  /* Increased from 13px */
    line-height: 1.5;
  }
  
  .tour-buttons {
    flex-direction: column-reverse;
    gap: 8px;
  }
  
  .tour-btn {
    width: 100%;
    justify-content: center;
    font-size: 15px;  /* Increased */
    padding: 12px 20px;  /* Increased */
  }
  
  .tour-pro-features {
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 13px;  /* Increased */
  }
  
  .tour-pro-screenshot {
    height: 100px;
    font-size: 12px;  /* Increased */
  }

  /* Welcome step mobile adjustments */
  .tour-tooltip.welcome-step {
    max-width: 75vw !important;
    width: 75vw !important;
  }
  
  .tour-logo {
    font-size: 26px;  /* Increased */
  }
  
  .tour-welcome-subtitle {
    font-size: 14px;  /* Increased */
  }
  
  /* Final step - COMPACT on mobile */
  .tour-tooltip.final-step {
    max-width: 75vw !important;
    width: 75vw !important;
  }
  
  .tour-tooltip.final-step .tour-content {
    padding: 16px;  /* Tighter padding */
  }
  
  .tour-tooltip.final-step .tour-title {
    font-size: 17px;  /* Slightly smaller */
  }
  
  .tour-tooltip.final-step .tour-text {
    font-size: 14px;  /* Slightly smaller */
    margin-bottom: 12px;
  }
  
  .tour-tooltip.final-step .tour-pro-preview {
    margin: 12px 0;
    padding: 12px;
  }
  
  .tour-tooltip.final-step .tour-pro-screenshot {
    height: 80px;  /* Smaller */
    font-size: 11px;
    margin-bottom: 8px;
  }
  
  .tour-tooltip.final-step .tour-pro-features {
    font-size: 12px;  /* Smaller features list */
    gap: 4px;
  }
  
  .tour-tooltip.final-step .tour-pro-feature {
    padding: 2px 0;
  }
  
  .tour-tooltip.final-step .tour-buttons {
    margin-top: 12px;
    padding-top: 12px;
  }
  
  .tour-tooltip.final-step .tour-btn {
    padding: 11px 18px;
  }
}

/* Dive Trails Info Modal - No Header Design */
.dive-trails-info-modal .modal-content {
  max-width: 920px;
  max-height: fit-content;
  border-radius: 20px;
  overflow: hidden;
}

.dive-trails-content .modal-body {
  overflow: visible;
  padding: 48px 48px 40px;
  background: white;
  position: relative;
}

/* Close button repositioned to top-right of body */
.dive-trails-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  font-size: 28px;
  transition: all 0.2s ease;
  z-index: 10;
}

.dive-trails-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
  transform: rotate(90deg);
}

/* Main heading */
.dive-trails-heading {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 32px 0;
  line-height: 1.2;
  text-align: center;
}

.dive-trails-body {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Single Feature Layout */
.trail-feature {
  display: flex;
  gap: 48px;
  align-items: center;
}

.trail-feature-image {
  flex: 0 0 48%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.trail-feature-image img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

.trail-feature-text {
  flex: 1;
}

.trail-feature-text h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1a1a1a;
  line-height: 1.3;
}

.trail-feature-text p {
  font-size: 16px;
  line-height: 1.7;
  color: #4a5568;
  margin-bottom: 24px;
}

/* Benefits List */
.trail-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trail-benefits li {
  font-size: 15px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trail-benefits li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  font-size: 12px;
  flex-shrink: 0;
}

/* CTA Button */
.trail-cta-container {
  text-align: center;
  margin-top: 8px;
  padding-top: 0;
}

.trail-explore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 44px;
  font-size: 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #36d1dc 0%, #5b86e5 100%);
  border: none;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(54, 209, 220, 0.35);
}

.trail-explore-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(54, 209, 220, 0.5);
  background: linear-gradient(135deg, #2ebfca 0%, #5079d9 100%);
}

.trail-explore-btn .crown-icon,
.trail-explore-btn span {
  position: relative;
  z-index: 1;
  color: white;
}

.trail-explore-btn .crown-icon {
  font-size: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dive-trails-info-modal .modal-content {
    max-width: 95%;
    border-radius: 16px;
  }

  .dive-trails-content .modal-body {
    padding: 40px 24px 32px;
  }

  .dive-trails-close {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }

  .dive-trails-heading {
    font-size: 26px;
    margin-bottom: 28px;
  }

  .dive-trails-body {
    gap: 28px;
  }

  .trail-feature {
    flex-direction: column;
    gap: 24px;
  }

  .trail-feature-image {
    flex: 0 0 auto;
    width: 100%;
  }

  .trail-feature-image img {
    height: 220px;
  }

  .trail-feature-text h3 {
    font-size: 21px;
  }

  .trail-feature-text p {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .trail-benefits {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .trail-benefits li {
    font-size: 14px;
  }

  .trail-cta-container {
    margin-top: 4px;
  }

  .trail-explore-btn {
    width: 100%;
    padding: 16px 36px;
    font-size: 17px;
  }
}