/* Interactive Tour Styles */

/* Overlay that covers the entire page */
.tour-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 99998;
  pointer-events: none;
}

/* Spotlight effect - cuts a hole in the overlay */
.tour-spotlight {
  position: fixed;
  z-index: 99999;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
  border-radius: 4px;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
}

/* Tour tooltip/dialog */
.tour-tooltip {
  position: fixed;
  z-index: 100000;
  background: #2d2d2d;
  border: 1px solid #4a4a4a;
  border-radius: 8px;
  padding: 20px;
  max-width: 360px;
  min-width: 280px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: tourFadeIn 0.3s ease-out;
}

@keyframes tourFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tooltip arrow - only show when arrow class is present */
.tour-tooltip.arrow-top::before,
.tour-tooltip.arrow-bottom::before,
.tour-tooltip.arrow-left::before,
.tour-tooltip.arrow-right::before {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #2d2d2d;
  border: 1px solid #4a4a4a;
  transform: rotate(45deg);
}

.tour-tooltip.arrow-top::before {
  top: -7px;
  left: 50%;
  margin-left: -6px;
  border-right: none;
  border-bottom: none;
}

.tour-tooltip.arrow-bottom::before {
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
  border-left: none;
  border-top: none;
}

.tour-tooltip.arrow-left::before {
  left: -7px;
  top: 50%;
  margin-top: -6px;
  border-right: none;
  border-top: none;
}

.tour-tooltip.arrow-right::before {
  right: -7px;
  top: 50%;
  margin-top: -6px;
  border-left: none;
  border-bottom: none;
}

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

.tour-title {
  color: #ffa500;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.tour-step-indicator {
  color: #888;
  font-size: 12px;
}

.tour-content {
  color: #d5d5d5;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.tour-content p {
  margin: 0 0 8px 0;
}

.tour-content p:last-child {
  margin-bottom: 0;
}

/* Tour navigation buttons */
.tour-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tour-btn {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.tour-btn-skip {
  background: transparent;
  color: #888;
  padding: 8px 12px;
}

.tour-btn-skip:hover {
  color: #fff;
}

.tour-btn-prev {
  background: #3d3d3d;
  color: #d5d5d5;
}

.tour-btn-prev:hover {
  background: #4d4d4d;
}

.tour-btn-next {
  background: #ffa500;
  color: #1a1a1a;
}

.tour-btn-next:hover {
  background: #ffb733;
}

.tour-btn-finish {
  background: #4caf50;
  color: #fff;
}

.tour-btn-finish:hover {
  background: #5cbf60;
}

.tour-nav-group {
  display: flex;
  gap: 8px;
}

/* Welcome screen (first step) */
.tour-welcome {
  text-align: center;
  padding: 10px 0;
}

.tour-welcome-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.tour-welcome h2 {
  color: #ffa500;
  font-size: 20px;
  margin: 0 0 8px 0;
}

.tour-welcome p {
  color: #888;
  font-size: 13px;
  margin: 0;
}

/* Start tour button in welcome */
.tour-btn-start {
  background: #ffa500;
  color: #1a1a1a;
  padding: 10px 24px;
  font-size: 14px;
  margin-top: 16px;
}

.tour-btn-start:hover {
  background: #ffb733;
}

/* Highlighted element - boost z-index above overlay and other elements */
.tour-highlight,
#context-menu.tour-highlight,
.settings-content.tour-highlight {
  z-index: 100001 !important;
  pointer-events: auto !important;
}

/* Help button to restart tour */
.tour-help-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #3d3d3d;
  border: 1px solid #4a4a4a;
  color: #d5d5d5;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tour-help-btn:hover {
  background: #4d4d4d;
  color: #ffa500;
  transform: scale(1.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .tour-tooltip {
    position: fixed !important;
    bottom: 20px !important;
    left: 10px !important;
    right: 10px !important;
    top: auto !important;
    max-width: none;
    width: auto;
    transform: none !important;
    padding: 20px;
  }

  /* Hide arrows on mobile since tooltip is fixed at bottom */
  .tour-tooltip.arrow-top::before,
  .tour-tooltip.arrow-bottom::before,
  .tour-tooltip.arrow-left::before,
  .tour-tooltip.arrow-right::before {
    display: none;
  }

  .tour-btn {
    min-height: 44px;
    padding: 12px 20px;
    font-size: 14px;
  }

  .tour-help-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
    bottom: 80px; /* Above any bottom navigation */
  }

  .tour-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .tour-nav-group {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .tour-tooltip {
    padding: 16px;
  }

  .tour-title {
    font-size: 15px;
  }

  .tour-content {
    font-size: 13px;
  }

  .tour-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}
