/* Noise Pollution Crisis Alert Banner - Level 3 Emergency Styling */

@keyframes wavePulse {
  0%, 50%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  25% { transform: scale(1.1) rotate(2deg); opacity: 0.9; }
  50% { transform: scale(0.95) rotate(-2deg); opacity: 0.95; }
  75% { transform: scale(1.02) rotate(1deg); opacity: 0.9; }
}

@keyframes waveDistortion {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes soundRipple {
  0% { transform: scale(0); opacity: 1; }
  50% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2); opacity: 0; }
}

.noise-crisis-alert-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  background-size: 400% 400%;
  animation: waveDistortion 6s ease-in-out infinite, wavePulse 4s infinite;
  z-index: 2000;
  border-bottom: 3px solid #0080ff;
  box-shadow: 0 5px 25px rgba(0, 128, 255, 0.6);
}

.noise-crisis-alert-banner.closing {
  animation: slideUp 0.5s ease-in forwards;
}

.noise-crisis-alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  gap: 20px;
}

.noise-crisis-icon {
  flex-shrink: 0;
  font-size: 2rem;
  color: #00ff80;
  animation: wavePulse 2s infinite;
}

.noise-crisis-text {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.noise-crisis-level {
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 128, 255, 0.8);
  letter-spacing: 1px;
}

.noise-crisis-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  line-height: 1.2;
}

.noise-crisis-action {
  font-weight: 500;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.9;
  font-style: italic;
}

.noise-crisis-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.noise-crisis-btn {
  background: linear-gradient(45deg, #0080ff, #00a0ff);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 128, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: wavePulse 3s infinite;
}

.noise-crisis-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 128, 255, 0.5);
  background: linear-gradient(45deg, #00a0ff, #0080ff);
}

.noise-crisis-close {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.noise-crisis-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg) scale(1.1);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Navbar adjustment when crisis alert is shown */
body.noise-crisis-alert-shown .navbar {
  top: 80px;
}

body.noise-crisis-alert-shown #main-content {
  margin-top: 80px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .noise-crisis-alert-content {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    text-align: center;
  }

  .noise-crisis-text {
    text-align: center;
  }

  .noise-crisis-level {
    font-size: 1rem;
  }

  .noise-crisis-title {
    font-size: 0.9rem;
  }

  .noise-crisis-action {
    font-size: 0.8rem;
  }

  .noise-crisis-btn {
    padding: 10px 15px;
    font-size: 0.8rem;
  }

  body.noise-crisis-alert-shown .navbar {
    top: 120px;
  }

  body.noise-crisis-alert-shown #main-content {
    margin-top: 120px;
  }
}

@media (max-width: 480px) {
  .noise-crisis-alert-content {
    padding: 10px;
  }

  .noise-crisis-actions {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .noise-crisis-btn {
    width: 100%;
    justify-content: center;
  }

  body.noise-crisis-alert-shown .navbar {
    top: 140px;
  }

  body.noise-crisis-alert-shown #main-content {
    margin-top: 140px;
  }
}

/* Additional urgency animations for Level 3 */
.noise-crisis-urgent-text {
  animation: wavePulse 1.5s infinite;
}

.noise-pulse {
  animation: wavePulse 1s infinite;
}

/* Emergency notification dot */
.noise-emergency-dot {
  width: 12px;
  height: 12px;
  background: #0080ff;
  border-radius: 50%;
  animation: wavePulse 1s infinite;
  box-shadow: 0 0 10px rgba(0, 128, 255, 0.8);
}

/* Sound wave animation for interactive elements */
.sound-wave-animation {
  position: relative;
  overflow: hidden;
}

.sound-wave-animation::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(0, 128, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: soundRipple 2s infinite;
}

.sound-wave-animation::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(0, 128, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: soundRipple 2s infinite 0.5s;
}