/* CHARCONV-01 multi-character conversation UI */

.charconv-start {
  max-width: 48rem;
}

.charconv-room {
  padding: 0;
}

.charconv-header .charconv-topic {
  font-weight: 500;
  line-height: 1.4;
}

.charconv-header .charconv-roster {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  margin-top: 0.2rem;
}

.charconv-transcript {
  max-height: 60vh;
  overflow-y: auto;
}

.charconv-transcript .turn {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.charconv-transcript .turn-system {
  background: hsl(var(--muted) / 0.5);
  color: hsl(var(--muted-foreground));
  font-style: italic;
  text-align: center;
}

.charconv-transcript .turn-user {
  background: hsl(var(--primary) / 0.18);
  border-left: 3px solid hsl(var(--primary));
}

.charconv-transcript .turn-character {
  background: hsl(var(--card));
  border-left: 3px solid hsl(var(--border));
}

.charconv-transcript .turn.interrupted {
  opacity: 0.7;
  font-style: italic;
}

.charconv-transcript .turn.streaming {
  opacity: 0.85;
}

.charconv-transcript .turn.streaming .turn-text:empty::after {
  content: "Speaking...";
  color: hsl(var(--muted-foreground));
  font-style: italic;
}

.charconv-transcript .speaker-name {
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
  color: hsl(var(--primary));
}

.charconv-transcript .speaker-name.system {
  color: hsl(var(--muted-foreground));
}

.charconv-transcript .speaker-name.user {
  color: hsl(var(--primary));
}

.charconv-text-form .charconv-text-input {
  flex: 1;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.charconv-text-form .charconv-text-input:focus {
  outline: none;
  border-color: hsl(var(--primary));
}

.charconv-topic-input {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  width: 100%;
  font-family: inherit;
}

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

/* Character picker grid */
.charconv-char-grid .char-card {
  background: hsl(var(--card));
  border: 2px solid hsl(var(--border));
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 150ms;
}

.charconv-char-grid .char-card:hover {
  border-color: hsl(var(--primary) / 0.6);
}

.charconv-char-grid .char-card.selected {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.08);
}

.charconv-char-grid .char-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.charconv-char-grid .char-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
  object-fit: cover;
}

/* Mic button in the room header */
.mic-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: hsl(var(--muted));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  color: hsl(var(--foreground));
  transition: background 150ms;
}

.mic-btn:hover {
  background: hsl(var(--muted) / 0.8);
}

.mic-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.mic-btn.on {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 150ms;
  cursor: pointer;
  border: 1px solid transparent;
  font-size: 0.875rem;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover:not(:disabled) {
  background: hsl(var(--primary) / 0.9);
}

.btn-primary:disabled {
  background: hsl(var(--muted));
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-ghost:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.btn-ghost {
  background: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background: hsl(var(--muted));
}

.btn-danger {
  background: hsl(var(--destructive, 0 70% 55%));
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
}
