/* TalkWide Web - In-Room Live Chat Panel */

.room-chat-panel {
  width: 340px;
  background: rgba(15, 23, 34, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}
.chat-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-close-btn-mobile {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
}

/* Chat Messages Feed */
.chat-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.chat-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tertiary);
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 82%;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}
.chat-sender-name {
  font-weight: 700;
  color: var(--text-secondary);
}
.chat-sender-name.is-self {
  color: var(--accent-primary);
}
.chat-time {
  color: var(--text-muted);
}

.chat-bubble {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  border-top-left-radius: 2px;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-message-item.is-self .chat-bubble {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.35);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: 2px;
}
.chat-message-item.is-self {
  flex-direction: row-reverse;
}
.chat-message-item.is-self .chat-meta {
  justify-content: flex-end;
}

/* Chat Input Bar */
.chat-input-area {
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
}

.chat-input-form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
  transition: var(--transition);
}
.chat-input-form:focus-within {
  border-color: var(--accent-primary);
}

.chat-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
}

.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.chat-send-btn:hover {
  background: var(--accent-primary-hover);
  transform: scale(1.05);
}
