/* ============================================
   CONVERSATION CARD OUTLINE STYLES
   ============================================ */

/* Base conversation card styling */
.conversation-card {
  position: relative;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 16px;
  background-color: #1a1529;
  border: 1px solid #3a3155;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Hover effect */
.conversation-card:hover {
  background-color: #2d2540;
  border-color: #8a7bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(138, 123, 255, 0.1);
}

/* Unread conversation */
.conversation-card.has-new {
  background-color: #2a2140;
  border-left: 3px solid #8a7bff;
}

/* Focus state for accessibility */
.conversation-card:focus {
  outline: 2px solid #8a7bff;
  outline-offset: 2px;
}

/* ============================================
   AVATAR STYLING
   ============================================ */

.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.conversation-avatar.business {
  background-color: #2a52be;
  color: white;
}

.conversation-avatar.promoter {
  background-color: #8a7bff;
  color: white;
}

.conversation-avatar.user {
  background-color: #4a4a4a;
  color: white;
}

/* Status indicator dot */
.conversation-avatar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #1a1529;
  background-color: #10b981;
}

.conversation-avatar.offline::after {
  background-color: #6b7280;
}

/* ============================================
   CONVERSATION CONTENT LAYOUT
   ============================================ */

.conversation-content {
  flex: 1;
  min-width: 0;
}

.conversation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

/* Name - bold and prominent */
.conversation-name {
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Unread name - different color */
.conversation-card.has-new .conversation-name {
  color: #ffffff;
}

/* Timestamp - small, colored */
.conversation-time {
  font-size: 11px;
  color: #8a7bff;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 8px;
  flex-shrink: 0;
}

.conversation-card.has-new .conversation-time {
  color: #8a7bff;
}

/* Role/company line - smaller, lighter */
.conversation-role {
  font-size: 12px;
  color: #b8b0d0;
  margin: 2px 0 4px 0;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Message preview - truncated, lighter */
.conversation-preview {
  font-size: 13px;
  color: #a499cc;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.conversation-card.has-new .conversation-preview {
  color: #d0c4ff;
  font-weight: 450;
}

/* Read conversation (less prominent) */
.conversation-card:not(.has-new) .conversation-name {
  color: #c9c1e0;
}

.conversation-card:not(.has-new) .conversation-preview {
  color: #8a7bff;
}

.conversation-card:not(.has-new) .conversation-time {
  color: #6b7280;
}

/* NEW indicator for unread messages */
.new-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ef4444;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Status dot in header */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.status-dot.offline {
  background-color: #6b7280;
}

/* Container for conversation info */
.conversation-info {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.conversation-company {
  font-size: 11px;
  color: #8a7bff;
  font-weight: 500;
  background-color: rgba(138, 123, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(138, 123, 255, 0.2);
}

/* Right side indicators */
.conversation-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.unread-count {
  background-color: #8a7bff;
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .conversation-card {
    padding: 12px;
  }
  
  .conversation-avatar {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .conversation-name {
    font-size: 14px;
  }
  
  .conversation-role {
    font-size: 11px;
  }
  
  .conversation-preview {
    font-size: 12px;
  }
  
  .conversation-time {
    font-size: 10px;
  }
}