/* Chat styles - extends global Terminimal theme */

/* Chat layout - sidebar + messages */
.chat-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 30px;
  width: 100%;
}

@media (max-width: 683px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .channels-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
}

/* Channels sidebar */
.channels-sidebar {
  border-right: 1px solid var(--border-color);
  padding-right: 20px;
}

.channels-header {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-alpha-70);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--accent);
}

/* Channel items */
.channel-item {
  display: block;
  padding: 8px 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
}

.channel-item:hover {
  color: var(--accent);
}

.channel-item.active {
  color: var(--accent);
}

.channel-item.active .channel-name::before {
  content: "> ";
  color: var(--accent);
}

.channel-icon {
  color: var(--accent-alpha-70);
  margin-right: 5px;
}

.channel-name {
  font-size: 0.95rem;
}

/* Messages area */
.messages-area {
  min-height: 400px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 2px dashed var(--accent);
}

.room-name {
  font-size: 1.2rem;
  color: var(--accent);
}

.read-only-badge {
  font-size: 0.8rem;
  padding: 3px 8px;
  background: var(--accent-alpha-20);
  color: var(--accent-alpha-70);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Messages list */
.messages-list {
  flex: 1;
  overflow-y: auto;
}

/* Individual message - styled like a post */
.message {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
}

.message:last-child {
  border-bottom: none;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.message-author {
  color: var(--accent);
  font-weight: bold;
}

.message-time {
  font-size: 0.85rem;
  color: var(--accent-alpha-70);
}

.message-content {
  line-height: 1.54;
  word-wrap: break-word;
}

/* Date separator */
.date-separator {
  text-align: center;
  padding: 20px 0;
  color: var(--accent-alpha-70);
  font-size: 0.9rem;
  position: relative;
}

.date-separator::before,
.date-separator::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--border-color);
}

.date-separator::before {
  left: 0;
}

.date-separator::after {
  right: 0;
}

/* Status messages */
.status-message {
  color: var(--accent-alpha-70);
  font-style: italic;
  padding: 10px 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 0;
  color: var(--accent-alpha-70);
}

/* Scrollbar */
.messages-list::-webkit-scrollbar {
  width: 6px;
}

.messages-list::-webkit-scrollbar-track {
  background: transparent;
}

.messages-list::-webkit-scrollbar-thumb {
  background: var(--accent-alpha-20);
  border-radius: 3px;
}

.messages-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent-alpha-70);
}
