/* Map view
  Styles for the map container and icons
*/

#mapView {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-dark);
  overflow: hidden;
}

.map-icon {
  position: absolute;
  width: 100px;
  height: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-icon:hover {
  transform: scale(1.1) translateY(-4px);
  filter: drop-shadow(var(--shadow-lg));
}

.map-icon:active {
  transform: scale(1.05) translateY(-2px);
}

/* Locked state */
.map-icon.locked {
  opacity: 0.65;
  cursor: not-allowed;
  filter: grayscale(70%) drop-shadow(var(--shadow-sm));
}

.map-icon.locked:hover {
  transform: none;
  opacity: 0.75;
}

.map-icon.locked::after {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* Completed module badge */
.map-icon.completed::before {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-success) 0%, #229954 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 20;
  border: 3px solid #fff;
}

/* Enhanced tooltip styling for map icons */
.map-icon[title]:hover::before {
  content: attr(title);
  position: absolute;
  bottom: 130px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 500;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
  from {
   opacity: 0;
   transform: translateX(-50%) translateY(4px);
  }
  to {
   opacity: 1;
   transform: translateX(-50%) translateY(0);
  }
}
