/* Network Map Animation - Mapa de red de telecomunicaciones corporativo */

.network-map-container {
  position: relative;
  width: 100%;
  height: 600px;
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark .network-map-container {
  background: #0a0a0a;
}

/* World map background SVG */
.world-map-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 1;
}

.dark .world-map-bg {
  opacity: 0.2;
  filter: invert(1);
}

#networkCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
}

/* Overlays de información técnica */
.network-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(81, 217, 214, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  font-family: 'Inter Tight', sans-serif;
  min-width: 200px;
}

.dark .network-overlay {
  background: rgba(10, 10, 10, 0.95);
  border-color: rgba(81, 217, 214, 0.3);
}

.network-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: #333;
}

.dark .network-stat {
  color: #e0e0e0;
}

.network-stat:last-child {
  margin-bottom: 0;
}

.network-stat-label {
  color: #666;
  font-weight: 500;
  margin-right: 12px;
}

.dark .network-stat-label {
  color: #999;
}

.network-stat-value {
  color: #51D9D6;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.network-stat-value.excellent {
  color: #10b981;
}

/* Indicadores de pulso */
.pulse-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #51D9D6;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

/* Badge de certificación */
.certification-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(81, 217, 214, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.dark .certification-badge {
  background: rgba(10, 10, 10, 0.95);
  border-color: rgba(81, 217, 214, 0.3);
}

.certification-icon {
  width: 24px;
  height: 24px;
  color: #51D9D6;
}

.certification-text {
  font-size: 12px;
  color: #333;
  font-weight: 600;
  line-height: 1.4;
}

.dark .certification-text {
  color: #e0e0e0;
}

.certification-subtext {
  font-size: 11px;
  color: #666;
  font-weight: 400;
}

.dark .certification-subtext {
  color: #999;
}

/* Country label tooltip */
.country-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
  white-space: nowrap;
}

.country-tooltip.visible {
  opacity: 1;
}

/* Legend */
.network-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(81, 217, 214, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 10;
  font-size: 11px;
}

.dark .network-legend {
  background: rgba(10, 10, 10, 0.95);
  border-color: rgba(81, 217, 214, 0.3);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
}

.dark .legend-item {
  color: #999;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.tier1 {
  background: #51D9D6;
  box-shadow: 0 0 8px rgba(81, 217, 214, 0.5);
}

.legend-dot.active {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.legend-line {
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, #51D9D6, transparent);
}

/* Responsive */
@media (max-width: 768px) {
  .network-map-container {
    height: 400px;
  }
  
  .network-overlay {
    top: 10px;
    right: 10px;
    padding: 12px 14px;
    min-width: 160px;
  }
  
  .network-stat {
    font-size: 11px;
    margin-bottom: 8px;
  }
  
  .certification-badge {
    bottom: 10px;
    left: 10px;
    padding: 10px 12px;
    gap: 8px;
  }
  
  .certification-icon {
    width: 20px;
    height: 20px;
  }
  
  .certification-text {
    font-size: 11px;
  }
  
  .certification-subtext {
    font-size: 10px;
  }
  
  .network-legend {
    display: none; /* Hide on mobile for cleaner look */
  }
}

/* Loading state */
.network-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #51D9D6;
  font-size: 14px;
  font-weight: 500;
}

.network-loading::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 8px;
  background: #51D9D6;
  border-radius: 50%;
  animation: loading-pulse 1.4s infinite ease-in-out;
}

@keyframes loading-pulse {
  0%, 80%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}
