/* Modern Notification System for Contact Form */
:root {
  --success-color: #4cc9f0;
  --success-bg: rgba(76, 201, 240, 0.1);
  --success-border: rgba(76, 201, 240, 0.3);
  --error-color: #ff4d6d;
  --error-bg: rgba(255, 77, 109, 0.1);
  --error-border: rgba(255, 77, 109, 0.3);
}

/* Base notification styles */
.notification {
  position: fixed;
  top: 30px;
  right: 30px;
  max-width: 350px;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

/* Success notification */
.notification-success {
  background: rgba(22, 22, 40, 0.9);
  border-left: 5px solid var(--success-color);
}

.notification-success::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--success-color), transparent);
}

/* Error notification */
.notification-error {
  background: rgba(22, 22, 40, 0.9);
  border-left: 5px solid var(--error-color);
}

.notification-error::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--error-color), transparent);
}

/* Icon container */
.notification-icon {
  margin-right: 15px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.notification-success .notification-icon {
  color: var(--success-color);
}

.notification-error .notification-icon {
  color: var(--error-color);
}

/* Content container */
.notification-content {
  flex: 1;
}

/* Title */
.notification-title {
  margin: 0 0 5px 0;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* Message */
.notification-message {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  white-space: pre-line; /* Preserves line breaks in error messages */
  max-height: 200px;
  overflow-y: auto; /* Add scrolling for very long messages */
}

/* Close button */
.notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 16px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
}

.notification-close:hover {
  color: #fff;
}

/* Progress bar */
.notification-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
}

.notification-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
}

.notification-success .notification-progress-bar {
  background: var(--success-color);
}

.notification-error .notification-progress-bar {
  background: var(--error-color);
}

/* Animation for progress bar */
@keyframes progress {
  0% {
    width: 100%;
  }
  100% {
    width: 0%;
  }
}

.notification-progress-bar.animate {
  animation: progress 5s linear forwards;
  /* Animation duration will be set dynamically in JavaScript */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .notification {
    top: auto;
    bottom: 30px;
    left: 20px;
    right: 20px;
    max-width: none;
    width: calc(100% - 40px);
  }
}
