﻿/* Room chat + voice (from BankGame / COMMUNICATIONS-UI.md) */
.chat-root {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  z-index: 280;
  pointer-events: none;
  box-sizing: border-box;
}

/* Compact new-message snack near the chat control */
.chat-preview {
  pointer-events: auto;
  position: absolute;
  left: 0.75rem;
  right: auto;
  bottom: 3.35rem;
  max-width: min(18rem, calc(100% - 1.5rem));
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: rgba(22, 30, 42, 0.94);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
  z-index: 3;
  opacity: 0;
  transform: translateY(0.4rem);
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  font: inherit;
  line-height: 1.3;
}

.chat-preview.show {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.chat-preview:hover {
  border-color: rgba(61, 156, 240, 0.45);
  background: rgba(28, 38, 54, 0.96);
}

.chat-preview:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chat-preview-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: 0 0 auto;
  margin-top: 0.35rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  background: #8b9bb4;
}

.chat-preview-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.chat-preview-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-preview-text {
  font-size: 0.88rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

/* Above play dock tools during active game */
body.play-active .chat-preview {
  left: 0.65rem;
  bottom: calc(var(--play-actions-h) + 0.55rem + env(safe-area-inset-bottom, 0px));
  z-index: 325;
}

/* During play, chat lives in the dock tools row â€” hide floating FAB */
body.play-active .chat-root {
  bottom: 0;
  top: 0;
  height: 100%;
}

body.play-active .chat-toggle {
  display: none !important;
}

.chat-toggle {
  pointer-events: auto;
  position: absolute;
  left: 0.75rem;
  bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  font-weight: 700;
  z-index: 2;
}

.chat-toggle:hover {
  background: #2c3a52;
}

.chat-toggle[aria-expanded='true'],
.play-actions-tools .play-tool-btn[aria-expanded='true'] {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.chat-unread {
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.chat-panel {
  pointer-events: auto;
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 3.25rem;
  display: flex;
  flex-direction: column;
  max-height: min(55dvh, 22rem);
  background: linear-gradient(165deg, var(--comms-bg-elevated) 0%, var(--comms-bg) 55%, var(--comms-bg-deep) 100%);
  border: 1px solid var(--comms-border);
  border-radius: var(--radius);
  box-shadow: var(--comms-shadow);
  overflow: hidden;
}

/* Sit above tools row + Roll/BANK dock during play */
body.play-active .chat-panel {
  bottom: calc(var(--play-actions-h) + 3.1rem + env(safe-area-inset-bottom, 0px));
  max-height: min(48dvh, 20rem);
  z-index: 330;
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(120, 185, 240, 0.18);
  background: rgba(30, 70, 110, 0.55);
  flex: 0 0 auto;
}

.chat-panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #b8d4f0;
}

.chat-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 6rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.chat-typing {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem 0.35rem;
  min-height: 1.35rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.12);
}

.chat-typing.hidden {
  display: none !important;
}

.chat-typing-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  flex-shrink: 0;
}

.chat-typing-dots span {
  width: 0.28rem;
  height: 0.28rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: chat-typing-bounce 1.2s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing-bounce {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Subtle pulse on chat toggle when someone is typing and panel is closed */
.chat-toggle.is-someone-typing,
.play-actions-tools .play-tool-btn.is-someone-typing {
  box-shadow: 0 0 0 2px rgba(61, 156, 240, 0.45);
}

.chat-empty {
  margin: 0.75rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  max-width: 92%;
  position: relative;
}

.chat-msg.is-self {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.chat-msg-swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.chat-msg-name {
  font-weight: 700;
  color: var(--text);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-msg-role {
  font-weight: 600;
  opacity: 0.75;
}

.chat-msg-time {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.chat-msg-text {
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  background: var(--bg-elevated);
  font-size: 0.9rem;
  line-height: 1.35;
  word-break: break-word;
  color: var(--text);
}

.chat-msg.is-self .chat-msg-text {
  background: rgba(61, 156, 240, 0.22);
  outline: 1px solid rgba(61, 156, 240, 0.35);
}

.chat-msg-reactions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.2rem;
  max-width: 100%;
}

.chat-msg.is-self .chat-msg-reactions {
  justify-content: flex-end;
}

.chat-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.12rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  cursor: pointer;
  opacity: 0.85;
}

.chat-react-btn:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.chat-react-btn.is-mine {
  border-color: rgba(61, 156, 240, 0.5);
  background: rgba(61, 156, 240, 0.18);
  opacity: 1;
}

.chat-react-btn.is-add {
  opacity: 0.55;
  font-size: 0.78rem;
  padding: 0.12rem 0.4rem;
}

.chat-react-btn .chat-react-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.chat-react-btn.is-mine .chat-react-count {
  color: var(--text);
}

.chat-react-menu {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.15rem);
  z-index: 5;
  flex-direction: row;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.chat-msg.is-self .chat-react-menu {
  left: auto;
  right: 0;
}

.chat-msg.is-react-open .chat-react-menu {
  display: flex;
}

.chat-react-menu button {
  margin: 0;
  padding: 0.25rem 0.35rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}

.chat-react-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.4rem 0.55rem;
  border-top: 1px solid rgba(120, 185, 240, 0.14);
  background: rgba(30, 70, 110, 0.4);
  max-height: 7.5rem;
  overflow-y: auto;
  flex: 0 0 auto;
}

.chat-emoji-picker.hidden {
  display: none !important;
}

.chat-emoji-picker button {
  margin: 0;
  padding: 0.3rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  width: 2rem;
  height: 2rem;
}

.chat-emoji-picker button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-compose {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(120, 185, 240, 0.16);
  background: rgba(20, 48, 72, 0.75);
  flex: 0 0 auto;
}

.chat-emoji-btn {
  flex: 0 0 auto;
  width: 2.4rem;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.chat-emoji-btn:hover,
.chat-emoji-btn[aria-expanded='true'] {
  border-color: var(--accent);
  background: rgba(61, 156, 240, 0.12);
}

.chat-compose input {
  /* Take almost all horizontal space; button stays compact */
  flex: 1 1 auto;
  width: 0; /* force flex grow to own leftover width in the row */
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  color: var(--text);
  outline: none;
}

.chat-compose input:focus {
  border-color: var(--accent);
}

/* Override .btn-primary { width: 100% } so Send stays a slim control */
.chat-compose .chat-send.btn-primary,
.chat-compose .chat-send {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-width: 0;
  margin-top: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
  align-self: stretch;
}

/* â€”â€” Room voice â€”â€” */
.voice-root {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max);
  /* Above chat-root (280); panel is a separate fixed layer */
  z-index: 286;
  pointer-events: none;
  box-sizing: border-box;
}

body.play-active .voice-root {
  bottom: 0;
  top: 0;
  height: 100%;
}

/* Combined speaker | mute control (lobby FAB + play dock) */
.voice-split {
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-elevated);
  color: var(--text);
  overflow: hidden;
  box-sizing: border-box;
  pointer-events: auto;
}

.voice-split-fab {
  pointer-events: auto;
  position: absolute;
  left: 5.75rem;
  bottom: 0.65rem;
  z-index: 5;
  box-shadow: var(--shadow);
}

body.play-active .voice-split-fab {
  display: none !important;
}

.voice-split-dock {
  flex: 1 1 0;
  min-width: 0;
  /* Match play-tool-btn height/look in the dock */
  box-shadow: none;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}

.play-actions-tools .voice-split-dock {
  background: rgba(255, 255, 255, 0.04);
}

.voice-split-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  line-height: 0;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.voice-split-menu .voice-speaker-icon,
.voice-split-menu .voice-speaker-icon path {
  pointer-events: none;
}

.voice-split-dock .voice-split-menu {
  padding: 0.45rem 0.65rem;
  flex: 1 1 auto;
}

.voice-split-menu:hover {
  background: rgba(255, 255, 255, 0.06);
}

.voice-split-divider {
  width: 1px;
  align-self: stretch;
  margin: 0.35rem 0;
  background: rgba(255, 255, 255, 0.16);
  flex: 0 0 auto;
}

.voice-split-mute,
button.voice-split-mute {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0.55rem 0 0.45rem;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  user-select: none;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.voice-split-mute:hover .voice-switch-track {
  border-color: rgba(255, 255, 255, 0.2);
}

.voice-split-mute.is-disabled {
  opacity: 0.55;
  cursor: pointer;
}

.voice-speaker-icon {
  display: block;
  flex-shrink: 0;
}

.voice-split .voice-speaker-off {
  display: none;
}

.voice-split.is-mic-off .voice-speaker-on {
  display: none;
}

.voice-split.is-mic-off .voice-speaker-off {
  display: block;
}

.voice-split.is-in-voice {
  border-color: rgba(61, 156, 240, 0.55);
  box-shadow: 0 0 0 1px rgba(61, 156, 240, 0.25);
}

.voice-split.is-live-mic {
  border-color: rgba(46, 204, 113, 0.65);
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.32);
}

.voice-split-fab.is-live-mic {
  box-shadow: var(--shadow), 0 0 0 2px rgba(46, 204, 113, 0.32);
}

.voice-split-menu[aria-expanded='true'] {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-radius: 999px 0 0 999px;
}

/* Volume lives only inside the Room voice dialog */
.voice-volume {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  cursor: pointer;
}

.voice-volume-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  flex: 0 0 auto;
}

.voice-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  flex: 1 1 auto;
  min-width: 3.5rem;
  cursor: pointer;
}

.voice-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--accent, #3d9cf0);
  border: 2px solid #0f1419;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.voice-volume-slider::-moz-range-thumb {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--accent, #3d9cf0);
  border: 2px solid #0f1419;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.voice-volume-row {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
  padding: 0.15rem 0.75rem 0.6rem;
  min-height: 2.65rem;
  box-sizing: border-box;
}

.voice-volume-panel {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  gap: 0.45rem;
  padding: 0 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  min-height: 2.45rem;
}

/* Mic on/off switch (button-based) â€” panel + split controls */
.voice-mic-switch,
button.voice-mic-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  min-height: 2.45rem;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.voice-mic-switch.is-disabled,
.voice-split-mute.is-disabled {
  opacity: 0.55;
  cursor: pointer;
}

.voice-mic-switch-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.1;
  min-width: 2.1rem;
}

.voice-mic-switch-state {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.voice-mic-switch.is-on .voice-mic-switch-state {
  color: #6dcea0;
}

.voice-switch-track {
  position: relative;
  width: 2.35rem;
  height: 1.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease;
  flex: 0 0 auto;
  pointer-events: none;
}

.voice-switch-thumb {
  position: absolute;
  top: 50%;
  left: 0.14rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #c5d0e0;
  transform: translateY(-50%);
  transition: left 0.15s ease, background 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* On state driven by aria-checked / .is-on (no checkbox) */
.voice-mute-btn.is-on .voice-switch-track,
.voice-mute-btn[aria-checked='true'] .voice-switch-track {
  background: rgba(76, 175, 120, 0.35);
  border-color: rgba(76, 175, 120, 0.55);
}

.voice-mute-btn.is-on .voice-switch-thumb,
.voice-mute-btn[aria-checked='true'] .voice-switch-thumb {
  left: calc(100% - 1.1rem);
  background: #6dcea0;
}

.voice-mute-btn:focus-visible .voice-switch-track {
  outline: 2px solid rgba(91, 159, 212, 0.7);
  outline-offset: 2px;
}

.voice-mic-switch:hover .voice-switch-track,
.voice-split-mute:hover .voice-switch-track {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Fixed panel above play dock / chat (own stacking context) */
.voice-panel {
  pointer-events: auto;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 1.3rem);
  max-width: calc(var(--app-max) - 1.3rem);
  bottom: 3.25rem;
  display: flex;
  flex-direction: column;
  max-height: min(50dvh, 18rem);
  background: linear-gradient(165deg, var(--comms-bg-elevated) 0%, var(--comms-bg) 55%, var(--comms-bg-deep) 100%);
  border: 1px solid var(--comms-border);
  border-radius: var(--radius);
  box-shadow: var(--comms-shadow);
  overflow: hidden;
  z-index: 340;
  box-sizing: border-box;
}

body.play-active .voice-panel {
  bottom: calc(var(--play-actions-h) + 0.75rem + env(safe-area-inset-bottom, 0px));
  max-height: min(42dvh, 16rem);
  z-index: 340;
}

.voice-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(120, 185, 240, 0.18);
  background: rgba(30, 70, 110, 0.55);
}

.voice-panel-title {
  font-weight: 800;
  color: #b8d4f0;
  font-size: 0.95rem;
}

.voice-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  border-radius: 8px;
}

.voice-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.voice-status {
  margin: 0;
  padding: 0.55rem 0.75rem 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Join / Leave â€” far right of the mic + speaker volume row */
.voice-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  margin-left: auto;
  flex: 0 0 auto;
}

.voice-actions .voice-action-btn {
  /* Beat global .btn-primary / .btn-secondary { width: 100% } */
  width: auto !important;
  flex: 0 0 auto;
  min-width: 4.25rem;
  margin: 0 !important;
  padding: 0 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 10px;
  min-height: 2.45rem;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
}

/* Compact labels on narrow panels â€” keep one control height */
@media (max-width: 420px) {
  .voice-volume-label {
    font-size: 0.7rem;
  }

  .voice-actions .voice-action-btn {
    min-width: 3.6rem;
    padding: 0 0.65rem;
    font-size: 0.8rem;
  }
}

.voice-peers {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.25rem 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.voice-peer {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
}

.voice-peer-swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.voice-peer-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-peer-badge {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.voice-peer.is-muted .voice-peer-badge {
  color: #8b9bb4;
}

.voice-peer.is-live .voice-peer-badge {
  color: #2ecc71;
}

.voice-peer.is-connecting .voice-peer-badge {
  color: #f0c14b;
}

.voice-peer.is-failed .voice-peer-badge {
  color: #e74c3c;
}

.voice-peers-empty {
  margin: 0.35rem 0.25rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}
