/* Visitor Map Widget - Simplified Styles */

.visitor-map-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: slideInUp 0.5s ease-out;
}

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

/* Header */
.visitor-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
}

.visitor-map-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.visitor-map-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.visitor-map-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Content */
.visitor-map-content {
  padding: 1rem;
}

/* Stats */
.visitor-map-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.visitor-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.visitor-stat-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.visitor-stat-icon.online {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.visitor-stat-icon i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.visitor-stat-info {
  flex: 1;
  min-width: 0;
}

.visitor-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  line-height: 1;
}

.visitor-stat-label {
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Map Visual */
.visitor-map-visual {
  margin-bottom: 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 0.75rem;
}

.visitor-map-svg {
  width: 100%;
  height: 80px;
  display: block;
}

.visitor-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #333;
}

.visitor-location i {
  color: #667eea;
}

/* Countries */
.visitor-countries {
  max-height: 150px;
  overflow-y: auto;
}

.visitor-countries::-webkit-scrollbar {
  width: 4px;
}

.visitor-countries::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 2px;
}

.visitor-countries::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 2px;
}

.visitor-countries-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.visitor-country-item {
  margin-bottom: 0.75rem;
}

.visitor-country-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.visitor-country-name {
  font-size: 0.85rem;
  color: #333;
  font-weight: 500;
}

.visitor-country-count {
  font-size: 0.8rem;
  color: #666;
  font-weight: 600;
}

.visitor-country-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.visitor-country-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Responsive */
@media (max-width: 768px) {
  .visitor-map-widget {
    width: calc(100vw - 40px);
    max-width: 320px;
    bottom: 10px;
    right: 10px;
  }

  .visitor-map-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .visitor-stat {
    padding: 0.5rem;
  }
}

/* Dark mode - Chirpy theme uses data-mode attribute */
[data-mode="dark"] .visitor-map-widget {
  background: #1e1e2e;
  color: #cdd6f4;
}

[data-mode="dark"] .visitor-stat {
  background: rgba(255, 255, 255, 0.05);
}

[data-mode="dark"] .visitor-stat-value {
  color: #cdd6f4;
}

[data-mode="dark"] .visitor-stat-label {
  color: #9399b2;
}

[data-mode="dark"] .visitor-map-visual {
  background: rgba(255, 255, 255, 0.05);
}

[data-mode="dark"] .visitor-location {
  background: rgba(102, 126, 234, 0.2);
  color: #cdd6f4;
}

[data-mode="dark"] .visitor-country-name {
  color: #cdd6f4;
}

[data-mode="dark"] .visitor-country-count {
  color: #9399b2;
}

[data-mode="dark"] .visitor-country-bar {
  background: rgba(255, 255, 255, 0.1);
}

[data-mode="dark"] .visitor-countries-title {
  color: #cdd6f4;
}

/* Hover effect */
.visitor-map-widget:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}
