/* Inbox Styles */
.no-conversations {
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.no-conversations-content h3 {
  margin-bottom: 10px;
  color: var(--dark-gray);
}

.no-conversations-content p {
  margin-bottom: 20px;
  color: var(--gray);
  line-height: 1.5;
}

.new-message-btn {
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.new-message-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.conversations-list {
  display: flex;
  flex-direction: column;
}

.conversation-item {
  display: flex;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.conversation-item:hover {
  background-color: var(--light-gray);
}

.conversation-item:last-child {
  border-bottom: none;
}

.conversation-avatar {
  position: relative;
  margin-right: 15px;
}

.avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.online-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray);
  border: 2px solid var(--white);
  transition: background-color 0.3s ease;
}

.online-indicator.online {
  background: var(--primary-color);
}

.conversation-info {
  flex: 1;
  min-width: 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.conversation-header h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-gray);
  display: flex;
  align-items: center;
  gap: 5px;
}

.message-time {
  font-size: 0.8rem;
  color: var(--gray);
}

.conversation-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.last-message {
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.unread-badge {
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 10px;
}

/* New Message Modal */
.new-message-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.new-message-modal.active {
  display: flex;
}

.new-message-modal .modal-content {
  background: var(--white);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
}

.search-users {
  padding: 20px;
}

.search-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 16px;
  margin-bottom: 15px;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.user-result {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.user-result:hover {
  background-color: var(--light-gray);
}

.user-result img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
}

.user-result-info h4 {
  margin: 0 0 2px 0;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.user-result-info p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--gray);
}

/* Responsive Design */
@media (max-width: 480px) {
  .conversation-item {
    padding: 12px 15px;
  }

  .avatar-img {
    width: 45px;
    height: 45px;
  }

  .conversation-header h4 {
    font-size: 0.95rem;
  }

  .last-message {
    font-size: 0.85rem;
  }
}
