* {
  font-family: monospace, monospace;
}

/* TOOLTIP STYLES (bottom of screen, like dialogue boxes) */
.walkthrough-tooltip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 30px;
  margin: 0 auto;
  width: 300px;
  background: white;
  padding: 10px 15px;
  border-radius: 8px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
  z-index: 4; /* above everything */
  font-size: 0.9rem;
  line-height: 1.4;
  color: #333;
  transition: all 0.3s ease;
  pointer-events: none;
  opacity: 0; /* initially hidden */
  text-align: center;
}

/* Caret (at bottom of tooltip, triangle) */
.walkthrough-tooltip::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: white transparent transparent;
}

/* When we create a tooltip, add visible class so we can see it */
.walkthrough-tooltip.visible {
  opacity: 1;
  transition: all 0.3s ease;
  animation: subtlePulse 3s infinite ease-in-out; /* Uses animation on tooltip for 3 seconds, infinitely*/
}

/* Very subtle up and down movement animation for tooltip */
@keyframes subtlePulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

/* WALKTHROUGH STYLES */
.walkthrough {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

/* When we're in the walkthrough (active), show walkthrough styles */
.walkthrough.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Tip Dialogue Box (contains zoom out demo and "+", "-", "?" buttons demo) */
.walkthrough-tip {
  background: white;
  border-radius: 12px;
  width: 500px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: auto;
  z-index: 1;
  overflow: hidden;
  margin: 0;
}

/* Show tip dialogue box when set visible */
.walkthrough-tip.visible {
  opacity: 1;
}

/* Green Header for walkthrough tip dialogue box (Says "TIP") */
.tip-header {
  background: #4caf50;
  color: white;
  padding: 12px 25px;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Inside Tip Dialogue Box, styles text */
.tip-content {
  padding: 25px;
  font-size: 1rem;
  line-height: 1.4;
  color: #333;
}

/* Normal Content Dialogue Box (contains helpful information unrelated to site mechanics) */
.walkthrough-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  width: 500px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease-in-out;
  opacity: 0;
  pointer-events: auto;
  z-index: 1;
  font-size: 1.1rem;
  line-height: 1.2;
  color: #333;
}

/* Show walkthrough content dialogue box when set visible */
.walkthrough.active .walkthrough-content {
  opacity: 1;
}

/* PROGRESS BAR of walkthrough tutorial, position at center top of screen under "Exit Walkthrough" button */
.walkthrough-progress {
  position: fixed;
  top: 60px; /* Positioned below the exit button with some margin */
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  overflow: hidden;
  z-index: 4;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Show progress bar when set visible */
.walkthrough-progress.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Green filling of progress bar */
.walkthrough-progress-bar {
  height: 100%;
  width: 0%;
  background: #28cb30;
  transition: width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* "Exit Walkthrough" Button of walkthrough tutorial, positioned at center top of screen */
.walkthrough-exit {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translate(-50%, 0);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: auto !important;
  color: #fff;
  font-size: 0.9rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 4;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

/* Upon hovering on exit button, change background color */
.walkthrough-exit:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -1px);
}

/* Walkthrough target (highlighted boxes such as on hover step) styling */
.walkthrough-target {
  z-index: 3;
  transition: all 0.3s ease-in-out;
}

/* Darkens background during steps in walkthrough with a target (hover, click) to emphasize target */
.walkthrough-highlight {
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.5); /* Darkens background (excluding target) to emphasize target */
  z-index: 2;
  opacity: 0;
  transition: all 0.4s ease-in-out;
}

/* Fake Cursor (for hover and click animations, guide user to target) */
.walkthrough-cursor {
  position: fixed;
  width: 30px;
  height: 30px;
  background-image: url("../images/cursor.png");
  background-size: contain;
  z-index: 4;
  transition: all 0.4s ease-in-out;
  opacity: 0;
  pointer-events: none; /* Make cursor click-through */
}

/* During click step, apply pulsing animation to fake cursor to simulate clicking movement */
.walkthrough-cursor.pulsing {
  animation: cursorPulse 1.5s infinite; /* Repeats cursorPulse (scaling) animation over 1.5s infinitely */
}

/* Click animation */
@keyframes cursorPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* NEXT BUTTON (on content and tip modals/dialogue boxes) */

/* Container for "Next" or "Got It!" button in dialogue boxes */
.walkthrough-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 1rem;
  padding: 0 0.5rem;
}

/* "Next" or "Got It!" button styling */
.walkthrough-nav button {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  background-color: #4caf50;
  color: white;
  transition: all 0.2s ease;
}

/* Enlargens "Next" or "Got It!" button when hovered over */
.walkthrough-nav button:hover {
  transform: scale(1.04);
  cursor: pointer;
}

/* Adds "→" to all "Next"/"Got It!" buttons*/
.walkthrough-next::after {
  content: "→";
  margin-left: 0.5rem;
  position: relative;
  top: 0;
  transition: transform 0.2s ease;
}

/* Hide "→" on finish button */
.walkthrough-next.finish-button::after {
  display: none;
  content: "";
}

/* Styling for TIP Dialogue Box demonstrating "+", "-", and "?" buttons */

/* Container for "+", "-", "?" in dialogue box */
.walkthrough-button-demo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 15px 0 25px;
  width: 100%;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.walkthrough-button-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 0 10px;
  box-sizing: border-box;
}

/* "+" and "-" button styling in TIP dialogue box */
.walkthrough-nav-button {
  width: 30px;
  height: 30px;
  background: #000000;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  color: #b3b3b3;
  border: none;
}

/* "?" button styling in TIP dialogue box */
.walkthrough-help-button {
  width: 30px;
  height: 30px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #000000;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Label underneath "+", "-", "?" buttons in TIP dialogue box explaining their use ("Zoom In", "Zoom Out", "Help") */
.walkthrough-button-label {
  font-size: 12px;
  margin-top: 8px;
  color: #333;
  text-align: center;
  line-height: 1.3;
  width: 100%;
}
