/* ============================================================================
 * UI ВОЛНЫ 5 (W5-13…W5-20) — отдельным файлом после app.css.
 *
 * ⚑ Не хвост app.css: его одновременно дописывают потоки 4c / 4d / 4e, и общий
 * хвост — конфликт в каждом мерже. Значения — из исходников Jitsi (cde875e5),
 * рядом с правилом — откуда.
 * ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- W5-13: «Participants Stats» (speaker-stats/components/web/*.tsx) ----------
   Окно 400 px (BaseDialog medium), без OK/Cancel. Поиск 40 px (48 при ≤480),
   подписи колонок 22px 0 7px, строка 56 (64 при ≤480) с разделителем, аватар
   32, плашка времени 2px 4px r4 жирная; у говорящего — #189B55, ушедший — серый. */
.j-stats { width: 400px; max-width: calc(100vw - 32px); }
.j-stats .call-dialog-body { gap: 0; }
.j-stats-searchbox { display: flex; }
.j-stats-search {
  flex: 1; min-width: 0; height: 40px; box-sizing: border-box;
  padding: 10px 16px; border: 1px solid #525252; border-radius: 6px;
  background: #3D3D3D; color: #fff; font: inherit; font-size: 14px; line-height: 20px;
}
.j-stats-search::placeholder { color: #C2C2C2; }
.j-stats-search:focus { outline: 0; box-shadow: 0 0 0 2px #4687ED; }
.j-stats-labels {
  display: flex; align-items: center; height: 20px; padding: 22px 0 7px;
  font-size: 12px; line-height: 16px; font-weight: 600; color: #C2C2C2;
}
.j-stats-labels[hidden] { display: none; }
.j-stats-labels-pad { flex: 0 0 56px; }
.j-stats-labels-name { flex: 1; }
.j-stats-list { max-height: min(50vh, 448px); overflow-y: auto; }
.j-stats-row {
  display: flex; align-items: center; height: 56px; box-sizing: border-box;
  box-shadow: inset 0 -1px 0 #292929;
  font-size: 14px; line-height: 20px; color: #fff;
}
.j-stats-avatar { width: 32px; height: 32px; flex: 0 0 32px; margin-right: 24px; font-size: 12px; }
.j-stats-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; }
.j-stats-time {
  flex: 0 0 auto; padding: 2px 4px; border-radius: 4px;
  font-size: 12px; line-height: 16px; font-weight: 600; background: #3D3D3D;
}
.j-stats-row.is-speaking .j-stats-time { background: #189B55; }
.j-stats-row.has-left { color: #858585; }
.j-stats-row.has-left .j-stats-avatar { background: #525252; }
.j-stats-row.has-left .j-stats-time { background: transparent; }
@media (max-width: 480px) {
  .j-stats-search { height: 48px; }
  .j-stats-row { height: 64px; }
}

/* ---- W5-15: «Performance settings» — ползунок на 4 ступени ----------------------
   VideoQualitySlider.web.tsx:88-212: «Adjust for:» (margin-bottom 16), ряд
   «Best performance / Highest quality» (жирный, margin-bottom 40), дорожка 6 px
   со скруглением, четыре точки 6×6, бегунок 24×24 круглый белый; поля окна
   16 / 16 / 48 / 16 поверх обычных полей окна. */
.j-perf { width: 400px; max-width: calc(100vw - 32px); }
.j-perf .call-dialog-body { gap: 0; }
.j-perf-adjust { font-size: 14px; line-height: 20px; margin-bottom: 16px; }
.j-perf-ends {
  display: flex; justify-content: space-between; padding: 0 16px; margin-bottom: 40px;
  font-size: 16px; line-height: 24px; font-weight: 600;
}
.j-perf-track { position: relative; height: 24px; margin: 0 16px; }
.j-perf-range {
  -webkit-appearance: none; appearance: none;
  position: absolute; inset: 0; width: 100%; height: 24px; margin: 0;
  background: transparent; cursor: pointer; z-index: 1;
}
.j-perf-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: #858585; }
.j-perf-range::-moz-range-track { height: 6px; border-radius: 3px; background: #858585; }
.j-perf-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; margin-top: -9px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 0 1px 1px rgba(0, 0, 0, .25);
}
.j-perf-range::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; }
.j-perf-range:focus { outline: 0; }
.j-perf-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px #4687ED; }
/* Точки ступеней: бегунок шириной 24, его центр ходит от 12 px до (100% − 12 px). */
.j-perf-dots {
  position: absolute; left: 9px; right: 9px; top: 9px; height: 6px;
  display: flex; justify-content: space-between; pointer-events: none; z-index: 2;
}
.j-perf-dots i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.j-perf-caption {
  margin: 16px 16px 32px; text-align: center;
  font-size: 12px; line-height: 16px; color: #C2C2C2; min-height: 16px;
}

/* Метка качества в шапке (VideoQualityLabel): светлая плашка 28×28 r4 со
   значком; при «Только звук» — с текстом. В плитке скрыта, как у Jitsi
   (video-quality/selector.ts:17-26). */
.j-subject-quality {
  display: flex; align-items: center; gap: 4px;
  height: 28px; min-width: 28px; box-sizing: border-box; padding: 6px; margin-left: 2px;
  border: 0; border-radius: 4px; background: #E0E0E0; color: #040404; cursor: pointer;
  font: inherit; font-size: 12px; line-height: 16px;
}
.j-subject-quality .icon { width: 16px; height: 16px; flex: none; }
.j-subject-quality-t:empty { display: none; }
.j-subject-quality:hover { background: #fff; }
.call-overlay--tiles .j-subject-quality { display: none; }

/* ---- W5-19, W5-20: индикатор связи на плитке и таблица «Connection Info» -------
   ConnectionIndicator.tsx:44-72: коробка 24×24 (значок 16, поле 4, r4) в левом
   верхнем углу плитки; меняется только фон — #1EC26A / #F8AE1A / #D83848 /
   #2F2E32; «Inactive» — ниндзя на синем круге. Соседей по углу (булавка, значок
   шары) сдвигает класс .call-tile--conn. */
.call-tile-conn {
  position: absolute; top: 4px; left: 4px; z-index: 12;
  width: 24px; height: 24px; padding: 4px; box-sizing: border-box;
  border: 0; border-radius: 4px; cursor: default;
  display: flex; align-items: center; justify-content: center;
  background: #1EC26A; color: #fff;
}
.call-tile-conn[hidden] { display: none; }
.call-tile-conn .icon { width: 16px; height: 16px; flex: none; color: #fff; }
.call-tile-conn--med { background: #F8AE1A; }
.call-tile-conn--low { background: #D83848; }
.call-tile-conn--lost { background: #2F2E32; }
.call-tile-conn--inactive { background: #4687ED; border-radius: 50%; padding: 0; }
.call-tile-conn--inactive .icon { width: 24px; height: 24px; }
.call-tile--conn .call-tile-pin,
.call-tile--conn .call-tile-share { margin-left: 28px; }

.call-conn-pop {
  position: absolute; z-index: 95; max-width: min(360px, calc(100% - 16px));
  padding: 16px; border-radius: 6px;
  background: #141414; color: #fff; border: 1px solid #525252;
  box-shadow: rgba(41, 41, 41, .25) 0 1px 2px;
  font-size: 12px; line-height: 16px;
}
.call-conn-title { font-size: 14px; line-height: 20px; font-weight: 600; margin-bottom: 8px; }
.call-conn-table { border-collapse: collapse; }
.call-conn-table td { padding: 2px 0; vertical-align: top; white-space: nowrap; }
.call-conn-table td:first-child { color: #C2C2C2; padding-right: 16px; font-weight: 600; }
.call-conn-table td:last-child { white-space: normal; overflow-wrap: anywhere; }
.call-conn-more {
  margin-top: 8px; padding: 0; border: 0; background: transparent; cursor: pointer;
  color: #6EA2FF; font: inherit; font-weight: 600;
}
.call-conn-more:hover { text-decoration: underline; }

/* Окна взаимоисключения «Share audio» (W5-18): текст в несколько строк. */
.confirm-text { white-space: pre-line; }
.call-notice--error { border-left-color: #D83848; }
