/* 
 * Alert System CSS
 * Professional and modern alert system with animations
 */

.alert-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* Higher than header */
  pointer-events: none; /* Let clicks pass through the container */
  padding-top: 80px; /* Space for fixed header */
}

.alert-wrapper {
  position: relative;
  width: 90%;
  max-width: 480px;
  margin-bottom: 16px;
  pointer-events: auto; /* Enable clicks on the alert itself */
}

.alert {
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 12px rgba(0, 0, 0, 0.08);
  font-size: 15px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: alertEntrance 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  transform-origin: top center;
  border-left: 5px solid transparent;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Alert types with modern gradients */
.alert-success {
  background: linear-gradient(145deg, rgba(52, 211, 106, 0.96), rgba(39, 187, 89, 0.96));
  color: white;
  border-left-color: #25a65c;
  box-shadow: 0 10px 25px rgba(39, 187, 89, 0.2), 0 6px 12px rgba(39, 187, 89, 0.15);
}

.alert-error {
  background: linear-gradient(145deg, rgba(239, 68, 90, 0.96), rgba(214, 41, 62, 0.96));
  color: white;
  border-left-color: #bd1f36;
  box-shadow: 0 10px 25px rgba(214, 41, 62, 0.2), 0 6px 12px rgba(214, 41, 62, 0.15);
}

.alert-warning {
  background: linear-gradient(145deg, rgba(255, 205, 43, 0.96), rgba(255, 183, 0, 0.96));
  color: white;
  border-left-color: #daa000;
  box-shadow: 0 10px 25px rgba(255, 183, 0, 0.2), 0 6px 12px rgba(255, 183, 0, 0.15);
}

.alert-info {
  background: linear-gradient(145deg, rgba(45, 165, 255, 0.96), rgba(13, 136, 255, 0.96));
  color: white;
  border-left-color: #0074e8;
  box-shadow: 0 10px 25px rgba(13, 136, 255, 0.2), 0 6px 12px rgba(13, 136, 255, 0.15);
}

.alert-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alert-icon svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0px 1px 1px rgba(0, 0, 0, 0.2));
}

.alert-message {
  flex: 1;
  font-weight: 500;
  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.2px;
}

.alert-close {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: inherit;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.2s ease;
  padding: 0;
  margin-left: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.alert-close:hover {
  opacity: 1;
  transform: scale(1.1) rotate(90deg);
  background: rgba(255, 255, 255, 0.25);
}

/* Enhanced animations */
@keyframes alertEntrance {
  0% {
    transform: translateY(-40px) scale(0.85);
    opacity: 0;
  }
  40% {
    transform: translateY(8px) scale(1.03);
    opacity: 1;
  }
  70% {
    transform: translateY(-5px) scale(0.98);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes alertExit {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  20% {
    transform: translateY(8px) scale(1.03);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-50px) scale(0.75);
    opacity: 0;
  }
}

.alert.fade-out {
  animation: alertExit 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .alert-container {
    padding-top: 70px;
  }
}

@media (max-width: 768px) {
  .alert-container {
    padding-top: 60px;
  }
  
  .alert-wrapper {
    width: 94%;
    max-width: 450px;
  }
  
  .alert {
    padding: 14px 16px;
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .alert-container {
    padding-top: 55px;
  }
  
  .alert-wrapper {
    width: 94%;
  }
  
  .alert {
    padding: 12px 16px;
    font-size: 14px;
    gap: 10px;
  }
  
  .alert-icon {
    width: 20px;
    height: 20px;
  }
  
  .alert-icon svg {
    width: 20px;
    height: 20px;
  }
}