/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes typingAnimation {
  0% {
    opacity: 0.4;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
  100% {
    opacity: 0.4;
    transform: translateY(0);
  }
}

/* Apply animations */
.app-container {
  animation: fadeIn 0.3s ease-in-out;
}

.message {
  animation: slideUp 0.2s ease-out;
}

.typing-indicator .dot:nth-child(1) {
  animation: typingAnimation 1s infinite 0.1s;
}

.typing-indicator .dot:nth-child(2) {
  animation: typingAnimation 1s infinite 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation: typingAnimation 1s infinite 0.3s;
}

.badge {
  animation: pulse 2s infinite;
}

.send-button {
  transition: transform var(--transition-fast) var(--easing-standard);
}

.send-button:hover {
  transform: scale(1.05);
}

.send-button:active {
  transform: scale(0.95);
}

/* Button hover effects */
.icon-button {
  transition: transform var(--transition-fast) var(--easing-standard),
              background-color var(--transition-fast) var(--easing-standard);
}

.icon-button:hover {
  transform: translateY(-1px);
}

.icon-button:active {
  transform: translateY(1px);
}

/* Input focus effects */
.message-input-wrapper, .search-input-wrapper {
  transition: box-shadow var(--transition-fast) var(--easing-standard);
}

.message-input:focus ~ .message-input-wrapper,
.search-input:focus ~ .search-input-wrapper {
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* Message hover effects */
.message-content {
  transition: transform var(--transition-fast) var(--easing-standard);
}

.message:hover .message-content {
  transform: translateY(-2px);
}

/* New message animation */
@keyframes newMessage {
  0% {
    transform: translateY(20px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.message:last-child {
  animation: newMessage 0.3s var(--easing-standard);
}

/* Conversation hover effect */
.conversation-item {
  transition: transform var(--transition-fast) var(--easing-standard),
              background-color var(--transition-fast) var(--easing-standard);
}

.conversation-item:hover {
  transform: translateX(4px);
}

.conversation-item.active {
  transform: translateX(4px);
}