/**
 * Sesli koltuk yerleşimi — tüm hizalama .voice-tile-media içinde (tek kaynak).
 */
.voice-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

.voice-tile-media {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: visible;
}

/* Halka = kesik/dolu daire çerçevesi */
.voice-tile .voice-tile-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  top: auto;
  left: auto;
  transform: none;
  border-radius: 50%;
  box-sizing: border-box;
  border: 3px solid var(--ring-color, #2979ff);
  transition: box-shadow 0.08s ease-out, border-width 0.08s ease-out;
  pointer-events: none;
}

.voice-tile-empty .voice-tile-ring {
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.voice-tile-empty-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.82);
  opacity: 0.95;
}

.voice-tile-empty .voice-tile-empty-label {
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
  font-weight: 600;
  text-shadow: none;
  max-width: 92px;
  font-size: 9px;
  line-height: 1.2;
  white-space: normal;
}

.chat-live-shell.has-live-voice .voice-tile-empty .voice-tile-empty-label {
  color: rgba(255, 255, 255, 0.85);
}

.voice-tile-empty-icon .voice-tile-empty-glyph,
.voice-tile-empty-icon .icon {
  width: 20px;
  height: 20px;
}

/* Avatar — halka içinde tam daire */
.voice-tile .voice-tile-avatar {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  margin: 0;
  transform: none;
  border-radius: 50%;
  box-sizing: border-box;
  z-index: 1;
}

/* Kamera / ekran — çerçevesiz tile'da media daire içinde kırpılır */
.voice-tile.has-cam:not(.has-avatar-frame):not(.has-screen) .voice-tile-media,
.voice-tile.has-screen .voice-tile-media {
  overflow: hidden;
}

.voice-tile.has-cam:not(.has-avatar-frame):not(.has-screen) .voice-tile-media {
  border-radius: 50%;
}

.voice-tile .voice-tile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  border-radius: 0;
  object-fit: cover;
  object-position: center center;
  box-sizing: border-box;
  z-index: 1;
  display: block;
}

.voice-tile.has-avatar-frame .voice-tile-avatar {
  inset: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.voice-tile:not(.has-avatar-frame) .voice-tile-avatar {
  overflow: hidden;
}

.voice-tile.has-avatar-frame .voice-tile-ring {
  border-color: transparent;
  background: transparent;
}

.voice-tile.has-avatar-frame.voice-speaking .voice-tile-ring {
  border-color: transparent;
  box-shadow: none;
}

.voice-tile .voice-tile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}

.voice-tile .voice-tile-avatar .voice-tile-avatar-inner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  margin: 0;
  padding: 0;
}

.voice-tile .voice-tile-avatar .voice-tile-avatar-inner img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.voice-tile.has-cam:not(.has-avatar-frame) .voice-tile-avatar,
.voice-tile.has-screen .voice-tile-avatar {
  display: none;
}

/* Kamera + çerçeve: avatar modu ile aynı — media/avatar overflow visible, çerçeve dışa taşar */
.voice-tile.has-cam.has-avatar-frame:not(.has-screen) .voice-tile-media {
  overflow: visible;
}

.voice-tile.has-cam.has-avatar-frame:not(.has-screen) .voice-tile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
  overflow: visible;
  z-index: 3;
  pointer-events: none;
}

.voice-tile.has-cam.has-avatar-frame .avatar-frame-inner > .voice-tile-avatar-inner {
  display: none;
}

.voice-tile.has-cam.has-avatar-frame:not(.has-screen) .voice-tile-video {
  z-index: auto;
}

.voice-tile.has-cam .voice-tile-video,
.voice-tile.has-screen .voice-tile-video {
  z-index: 2;
  display: block;
}

/* Konuşma — yeşil halka */
.voice-tile.voice-speaking .voice-tile-ring {
  border-color: #43a047;
  box-shadow:
    0 0 0 calc(2px + var(--voice-level, 0) * 5px) rgba(67, 160, 71, 0.55),
    0 0 calc(10px + var(--voice-level, 0) * 16px) rgba(67, 160, 71, 0.45);
  animation: none;
}

/* İsim — medyanın altında (absolute değil) */
.voice-tile .voice-tile-name {
  position: static;
  margin-top: 6px;
  margin-bottom: 1px;
  max-width: 76px;
  width: 100%;
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
  opacity: 0.9;
  overflow: visible;
}

.voice-tile .voice-tile-name.nick-cosmetic-host--slot-fit {
  max-width: 100%;
  margin-top: 6px;
  margin-bottom: 1px;
  overflow: visible;
}

.voice-tile .voice-tile-menu {
  position: absolute;
  top: 0;
  right: 2px;
  z-index: 5;
}

.voice-tile-listen-mute {
  position: absolute;
  top: auto;
  left: 2px;
  right: auto;
  bottom: 2px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.15s, opacity 0.15s;
}

.voice-tile-listen-mute:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.72);
}

.voice-tile-listen-mute.is-active {
  background: rgba(183, 28, 28, 0.85);
  color: #fff;
}

.voice-tile.listen-muted .voice-tile-ring {
  opacity: 0.45;
}

.voice-tile-cam-icon,
.voice-tile-source-icon,
.voice-tile-screen-icon {
  position: absolute;
  z-index: 4;
  top: 4px;
  left: calc(50% + 20px);
  right: auto;
  bottom: auto;
  font-size: 10px;
}

.voice-tile-mute-icon {
  position: absolute;
  z-index: 7;
  top: auto;
  right: 2px;
  bottom: 2px;
  left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  pointer-events: none;
}

.voice-tile-source-icon {
  top: 18px;
  left: calc(50% + 22px);
}

.voice-rank-badge {
  position: absolute;
  top: 4px;
  left: calc(50% - 34px);
  z-index: 4;
}

/* Canlı oda (üst bant) — biraz daha büyük, yine ortalı */
.chat-live-shell.has-live-voice .voice-tile {
  flex: 0 0 72px;
  width: 72px;
  min-height: 92px;
  height: auto;
  margin: 2px 3px 5px;
}

.chat-live-shell.has-live-voice .voice-tile-media {
  width: 58px;
  height: 58px;
}

.chat-live-shell.has-live-voice .voice-tile .voice-tile-name {
  max-width: 68px;
}

.chat-live-shell.has-live-voice .voice-tile.has-avatar-frame {
  margin: 2px 4px 6px;
}

.chat-live-shell.has-live-voice .voice-tile-empty .voice-tile-ring {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.1);
}

.chat-live-shell.has-live-voice .voice-tile-empty .voice-tile-empty-icon {
  color: rgba(255, 255, 255, 0.78);
  opacity: 0.92;
}

.voice-tile-empty.voice-tile-pending .voice-tile-ring {
  border-color: rgba(255, 220, 120, 0.85);
  background: rgba(255, 220, 120, 0.12);
}

.voice-tile-empty.voice-tile-pending .voice-tile-empty-label {
  color: rgba(255, 230, 150, 0.95);
  font-weight: 700;
}

.chat-live-shell.has-live-voice .voice-tile-empty.voice-tile-pending .voice-tile-ring {
  border-color: rgba(255, 220, 120, 0.8);
  background: rgba(255, 220, 120, 0.14);
}

/* Mikrofon talep sırası paneli */
.voice-stage-queue {
  display: block;
  margin: 10px 4px 4px;
  width: 100%;
  box-sizing: border-box;
}

.voice-stage-queue-panel {
  border-radius: var(--chat-modal-card-radius, 12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.voice-stage-queue-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  user-select: none;
}

.voice-stage-queue-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.voice-stage-queue-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.voice-stage-queue-list.is-collapsed {
  display: none !important;
}

.voice-stage-queue-panel.is-collapsed .voice-stage-queue-head {
  border-bottom: none;
}

.voice-stage-queue-head .voice-queue-panel-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.9;
}

.voice-stage-queue-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex: 1;
  min-width: 0;
}

.voice-stage-queue-count {
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 193, 7, 0.22);
  color: #ffe082;
  border: 1px solid rgba(255, 193, 7, 0.35);
}

.voice-stage-queue-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: min(220px, 40vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.voice-stage-queue-list::-webkit-scrollbar {
  width: 4px;
}

.voice-stage-queue-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
}

.voice-queue-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.voice-queue-order {
  flex-shrink: 0;
  min-width: 22px;
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 220, 120, 0.95);
  text-align: center;
  line-height: 1;
}

.voice-stage-queue-self {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 4px 4px;
}

.voice-stage-queue-self .voice-queue-card {
  border-radius: var(--chat-modal-card-radius, 12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.voice-stage-queue-self .voice-queue-card:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.voice-queue-card:last-child {
  border-bottom: none;
}

.voice-queue-card-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-queue-card-avatar .avatar-frame-slot {
  --frame-size: 44px;
  width: var(--frame-size);
  height: var(--frame-size);
}

.voice-queue-stage-avatar-wrap,
.voice-queue-stage-avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
  border-radius: 50%;
}

.voice-queue-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-queue-card-name,
.voice-queue-card-name .voice-queue-stage-name,
.voice-queue-card-name .member-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-queue-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-queue-slot-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(41, 121, 255, 0.22);
  color: #bbdefb;
  border: 1px solid rgba(41, 121, 255, 0.35);
}

.voice-queue-slot-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.voice-queue-slot-field-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.voice-queue-slot-select {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 28px 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: rgba(15, 23, 42, 0.45);
  color: #fff;
  min-width: 72px;
  max-width: 120px;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.7) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.voice-queue-slot-select:focus {
  outline: none;
  border-color: rgba(41, 121, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(41, 121, 255, 0.25);
}

.voice-queue-slot-select option {
  color: #0f172a;
  background: #fff;
}

.voice-queue-card-actions {
  flex-shrink: 0;
}

.voice-queue-card-actions--mod {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.voice-queue-card-actions--mod .voice-queue-grant-btn,
.voice-queue-card-actions--mod .voice-queue-deny-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

.voice-queue-deny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(229, 57, 53, 0.45);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #ffcdd2;
  background: rgba(229, 57, 53, 0.18);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.voice-queue-deny-btn:hover {
  background: rgba(229, 57, 53, 0.32);
  border-color: rgba(229, 57, 53, 0.65);
  color: #fff;
}

.voice-queue-deny-btn .icon-inline {
  width: 14px;
  height: 14px;
}

.voice-queue-grant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2979ff 0%, #1565c0 100%);
  box-shadow: 0 4px 12px rgba(41, 121, 255, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.voice-queue-grant-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(41, 121, 255, 0.45);
}

.voice-queue-grant-btn .icon-inline {
  width: 14px;
  height: 14px;
}

.voice-queue-cancel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.12s ease, border-color 0.12s ease;
}

.voice-queue-cancel-btn:hover {
  background: rgba(229, 57, 53, 0.22);
  border-color: rgba(229, 57, 53, 0.45);
  color: #ffcdd2;
}

.voice-queue-cancel-btn .icon-inline {
  width: 14px;
  height: 14px;
}

.voice-queue-card-avatar .avatar-frame-inner,
.voice-queue-card-avatar .voice-queue-stage-avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.voice-queue-card-avatar .avatar-has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@media (max-width: 480px) {
  .voice-stage-queue {
    margin: 8px 2px 2px;
  }

  .voice-queue-card {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .voice-queue-card-actions {
    width: 100%;
  }

  .voice-queue-card-actions--mod {
    width: 100%;
    flex-direction: row;
  }

  .voice-queue-card-actions--mod .voice-queue-grant-btn,
  .voice-queue-card-actions--mod .voice-queue-deny-btn {
    flex: 1 1 0;
  }

  .voice-queue-slot-select {
    flex: 1;
    max-width: none;
  }
}

.voice-slot-requests {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 72px;
  margin-top: 2px;
}

.voice-slot-req-btn {
  font-size: 10px;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-dark);
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-slot-req-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 480px) {
  .voice-slot-requests {
    max-width: 64px;
  }

  .voice-slot-req-btn {
    font-size: 9px;
    padding: 2px 5px;
  }
}

/* Ekran paylaşımı — geniş koltuk */
.voice-tile.has-screen {
  flex: 0 0 180px;
  width: 180px;
  min-height: 128px;
  height: auto;
}

.voice-tile.has-screen .voice-tile-media {
  width: calc(100% - 8px);
  height: 112px;
  margin-top: 4px;
  border-radius: 10px;
  overflow: hidden;
}

.voice-tile.has-screen .voice-tile-ring {
  border-radius: 10px;
}

.voice-tile.has-screen .voice-tile-video {
  object-fit: contain;
  object-position: center center;
  background: rgba(0, 0, 0, 0.85);
}

.chat-live-shell.has-live-voice .voice-tile.has-screen {
  flex: 0 0 220px;
  width: 220px;
}

.chat-live-shell.has-live-voice .voice-tile.has-screen .voice-tile-media {
  height: 132px;
}

/* Spotlight */
.voice-spotlight {
  position: fixed;
  inset: 0;
  z-index: 15500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-spotlight.hidden {
  display: none !important;
}

.voice-spotlight-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.voice-spotlight-card {
  position: relative;
  z-index: 1;
  background: #111;
  border-radius: 12px;
  padding: 12px;
  max-width: min(92vw, 420px);
  width: 100%;
}

.voice-spotlight-card h3 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 15px;
  text-align: center;
}

.voice-spotlight-card video {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  display: block;
}

.voice-spotlight-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

/* Çok satır slot — satırlar arası hafif ekstra dikey boşluk */
.voice-stage-scroll {
  row-gap: 10px;
  column-gap: 12px;
  gap: 10px 12px;
  align-content: flex-start;
}

.chat-live-shell.has-live-voice .voice-stage-scroll {
  row-gap: 10px;
  column-gap: 13px;
  gap: 10px 13px;
  padding-bottom: 10px;
}

html.layout-compact .voice-stage-scroll,
html.layout-compact .chat-live-shell.has-live-voice .voice-stage-scroll {
  row-gap: 6px;
  column-gap: 4px;
  gap: 6px 4px;
  padding-bottom: 6px;
}

html.layout-compact .voice-stage-scroll .voice-tile,
html.layout-compact .chat-live-shell.has-live-voice .voice-stage-scroll .voice-tile {
  margin: 0;
}

html.layout-compact .voice-stage-scroll .voice-tile.has-avatar-frame,
html.layout-compact .chat-live-shell.has-live-voice .voice-stage-scroll .voice-tile.has-avatar-frame {
  margin: 2px 4px 6px;
}
