/* Custom styles to complement Bootstrap */

/* Chat item styling */
.chat-item {
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
}

.chat-item:hover {
  background-color: #f8f9fa;
}

.chat-item.active {
  background-color: #e9ecef;
}

/* Message bubbles */
.message {
  max-width: 70%;
  animation: messageSlideIn 0.2s ease;
}

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

.message-received {
  align-self: flex-start;
}

.message-received .message-content {
  background-color: #e9ecef;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border-top-left-radius: 0.25rem;
}

.message-sent {
  align-self: flex-end;
}

.message-sent .message-content {
  background-color: #0d6efd;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border-top-right-radius: 0.25rem;
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-left: 0.5rem;
}

.message-status {
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

/* Incoming call animation */
@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#incoming-call:not(.d-none) {
  animation: slideInRight 0.3s ease;
}

/* Active button states for call controls */
.btn.active {
  background-color: #0d6efd !important;
  color: white !important;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  #sidebar {
    position: absolute;
    left: -320px;
    height: 100%;
    transition: left 0.3s;
    z-index: 1040;
  }

  #sidebar.show {
    left: 0;
  }
}
