/**
 * Demo Info Popups - Styles for feature hotspots and popups
 */

/* Hotspot button */
.demo-info-hotspot {
  position: absolute;
  z-index: 10000;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #002147 0%, #1a3a5c 100%);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 33, 71, 0.4), 0 0 0 2px rgba(0, 33, 71, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  animation: hotspot-pulse 2s infinite;
}

.demo-info-hotspot span {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.demo-info-hotspot:hover,
.demo-info-hotspot.active {
  transform: scale(1.15);
  background: linear-gradient(135deg, #1a3a5c 0%, #002147 100%);
  box-shadow: 0 4px 12px rgba(0, 33, 71, 0.5), 0 0 0 3px rgba(0, 33, 71, 0.3);
  animation: none;
}

.demo-info-hotspot:focus {
  outline: 2px solid #f5a623;
  outline-offset: 2px;
}

@keyframes hotspot-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.4), 0 0 0 2px rgba(0, 33, 71, 0.2);
  }
  50% {
    box-shadow: 0 2px 8px rgba(0, 33, 71, 0.4), 0 0 0 6px rgba(0, 33, 71, 0.1);
  }
}

/* Popup dialog */
.demo-info-popup {
  position: fixed;
  z-index: 10001;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 16px 20px;
  max-width: 320px;
  min-width: 240px;
  animation: popup-appear 0.2s ease;
}

.demo-info-popup::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 12px;
  height: 12px;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

@keyframes popup-appear {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-info-popup h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: #002147;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding-right: 24px;
}

.demo-info-popup p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #4a5568;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.demo-info-popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  font-size: 20px;
  color: #718096;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.demo-info-popup-close:hover {
  background: #f7fafc;
  color: #2d3748;
}

.demo-info-popup-close:focus {
  outline: 2px solid #002147;
  outline-offset: 1px;
}

/* Element highlight when info mode is active */
.demo-info-highlight {
  position: relative;
  outline: 2px dashed rgba(0, 33, 71, 0.3) !important;
  outline-offset: 4px;
}

/* Subtle overlay when info mode is on */
body.demo-info-visible::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 33, 71, 0.03);
  pointer-events: none;
  z-index: 9998;
}

/* Info panel indicator in toolbar */
#demoInfoToggle.active {
  background: rgba(0, 33, 71, 0.15);
}

#demoInfoToggle.active i {
  color: #002147;
}

