/* Custom Message Styles for Form Submissions */

.message-container {
  position: fixed;
  top: 90px;
  right: 30px;
  z-index: 9999;
  max-width: 380px;
  animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.message-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 14px 18px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 3px solid;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.message-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.message-card.closing {
  animation: slideOutRight 0.3s ease-in forwards;
}

/* Success Message */
.message-card.success {
  border-left-color: #10B981;
  background: linear-gradient(135deg, #ffffff 0%, #F0FDF4 100%);
}

.message-card.success .message-icon {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #ffffff;
}

/* Error Message */
.message-card.error {
  border-left-color: #EF4444;
  background: linear-gradient(135deg, #ffffff 0%, #FEF2F2 100%);
}

.message-card.error .message-icon {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #ffffff;
}

/* Warning Message */
.message-card.warning {
  border-left-color: #F59E0B;
  background: linear-gradient(135deg, #ffffff 0%, #FFFBEB 100%);
}

.message-card.warning .message-icon {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #ffffff;
}

/* Info Message */
.message-card.info {
  border-left-color: #4C38FF;
  background: linear-gradient(135deg, #ffffff 0%, #F0EDFF 100%);
}

.message-card.info .message-icon {
  background: linear-gradient(135deg, #4C38FF 0%, #6B5AFF 100%);
  color: #ffffff;
}

/* Message Icon */
.message-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Message Content */
.message-content {
  flex: 1;
  padding-top: 0;
}

.message-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px 0;
  color: #1a1a1a;
  line-height: 1.3;
}

.message-text {
  font-size: 13px;
  margin: 0;
  color: #666666;
  line-height: 1.4;
}

/* Close Button */
.message-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  color: #999999;
  font-size: 18px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
}

.message-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333333;
}

/* Progress Bar */
.message-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  width: 100%;
  animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

.message-card.success .message-progress {
  background: #10B981;
}

.message-card.error .message-progress {
  background: #EF4444;
}

.message-card.warning .message-progress {
  background: #F59E0B;
}

.message-card.info .message-progress {
  background: #4C38FF;
}

/* Responsive */
@media (max-width: 768px) {
  .message-container {
    right: 15px;
    left: 15px;
    max-width: none;
    top: 70px;
  }
  
  .message-card {
    padding: 12px 16px;
  }
  
  .message-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .message-title {
    font-size: 13px;
  }
  
  .message-text {
    font-size: 12px;
  }
}

/* Static messages (for inline display) */
.message-inline {
  position: relative;
  animation: fadeIn 0.4s ease-out;
  margin-bottom: 24px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-inline .message-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
