.chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat__row {
  display: flex;
}

.chat__row--client {
  justify-content: flex-end;
}

.chat__row--me {
  justify-content: flex-start;
}

.chat__bubble {
  max-width: 72%;
  padding: var(--space-2) var(--space-3);
  border-radius: 18px;
  font-size: 1rem;
  line-height: 1.5;
}

.chat__bubble--client {
  background: var(--accent);
  color: var(--text-on-accent);
  border-bottom-right-radius: 4px;
}

.chat__bubble--me {
  background: var(--chat-me-bg);
  color: var(--chat-me-color);
  border-bottom-left-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .chat__bubble--client {
    background: var(--chat-client-bg-dark);
    color: var(--text-on-accent);
  }
}

.chat__compose {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.chat__compose-plus {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
}

.chat__compose-plus svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.5;
}

.chat__compose-plus:hover {
  background: var(--surface-hover);
  border-color: var(--text-tertiary);
}

.chat__compose-input {
  flex: 1;
  height: 34px;
  border-radius: 17px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
  cursor: text;
  transition:
    border-color var(--duration-fast) ease,
    background var(--duration-fast) ease;
}

.chat__compose-input:hover {
  border-color: var(--text-tertiary);
  background: var(--surface-hover);
}

.chat__compose-placeholder {
  font-size: var(--text-sm);
  color: var(--text-primary);
  user-select: none;
  pointer-events: none;
}

.chat__compose-cursor {
  display: inline-block;
  width: 1.5px;
  height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: cursor-pulse 1.6s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%,
  100% {
    opacity: 1;
  }
  85% {
    opacity: 0.15;
  }
}

@media (prefers-color-scheme: dark) {
  .chat__compose-cursor {
    background: var(--accent-on-dark);
  }
}
