/* TR Portal — правая панель: баланс под клубом, голосовой чат, меню друга, уведомления стопкой (#270, макет voice-sidebar-270 v2).
   Подключается после friends.css. Цвета — токены панели из sidebars.css (--t1..--t3, --rline, --ok-t, --off, --wine). */
#ptRight { --vc-field: rgba(255,255,255,.10); --vc-pop: #23262c; --vc-bad: #ff8a8a; }
#ptRight.lt { --vc-field: rgba(0,0,0,.08); --vc-pop: #fff; --vc-bad: #b91c1c; }

/* баланс — сразу под строкой клуба, только вошедшему */
#ptRight .pt-club + .sb-bal, #ptRight #ptBal { margin: 0 0 4px; }
body:not(.pt-in) #ptRight #ptBal { display: none; }

/* кнопки */
.pt-vc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 9px 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.04); color: var(--t2); font: inherit; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
.pt-vc-btn i { font-size: 14px; }
.pt-vc-btn:hover { background: rgba(255,255,255,.08); color: var(--t1); }
.pt-vc-btn:disabled { opacity: .55; cursor: default; }
.pt-vc-btn:focus-visible, .pt-vc-main:focus-visible, .pt-vc-set:focus-visible, .pt-vc-mini:focus-visible, .pt-friend-more:focus-visible, .pt-vc-title:focus-visible { outline: 2px solid var(--t1); outline-offset: 1px; }
.pt-vc-btn.is-wide { width: 100%; }
.pt-vc-btn.is-main { border-color: transparent; background: var(--tr-red, #f00); color: #fff; box-shadow: 0 2px 12px rgba(204,0,0,.3); }
.pt-vc-btn.is-bad { border-color: rgba(255,138,138,.45); background: none; color: var(--vc-bad); }
.pt-vc-btn.is-act { border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.12); color: var(--t1); }
.pt-vc-btn.is-off { color: var(--vc-bad); }

/* чата нет — одна кнопка */
.pt-voice[hidden] { display: none !important; }
.pt-vc-new { margin: 12px 0 0; }
.pt-vc-note { margin-top: 6px; color: var(--t3); font-size: 12px; line-height: 1.4; }

/* блок чата */
.pt-vc { position: relative; }
.pt-vc-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pt-vc-title { min-width: 0; padding: 0; border: 0; background: none; color: var(--t1); font: inherit; font-size: 15px; font-weight: 800; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.pt-vc-title { cursor: text; }
button.pt-vc-title:hover b { text-decoration: underline dotted; text-underline-offset: 3px; }
.pt-vc-name small { flex: none; color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-vc-rename { display: flex; flex: 1; gap: 4px; min-width: 0; }
.pt-vc-rename input { flex: 1; min-width: 0; height: 30px; padding: 0 8px; border: 1px solid var(--rline); border-radius: 6px; background: var(--vc-field); color: var(--t1); font: inherit; font-size: 14px; font-weight: 700; }
.pt-vc-rename button { flex: none; width: 30px; height: 30px; border: 0; border-radius: 6px; background: var(--vc-field); color: var(--t1); cursor: pointer; }

.pt-vc-pp { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.pt-vc-pp.is-open { margin: 0 -6px; padding: 5px 6px; border-radius: 8px; background: rgba(255,255,255,.05); }
.pt-vc-av { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--vc-field); color: var(--t2); font-size: 13px; font-weight: 800; }
.pt-vc-main { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; font: inherit; text-align: left; color: inherit; }
button.pt-vc-main { cursor: pointer; }
.pt-vc-main b { overflow: hidden; color: var(--t2); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pt-vc-main small { color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-vc-mic { flex: none; color: var(--t3); font-size: 18px; }
.pt-vc-set { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--t3); font-size: 16px; cursor: pointer; }
.pt-vc-set:hover, .pt-vc-set.is-open { background: rgba(255,255,255,.10); color: var(--t1); }
/* говорит — без колец: ник белый жирнее, подпись и микрофон зелёные; выключен — красные; заглушён у себя — серый */
.pt-vc-pp.is-say .pt-vc-main b { color: var(--t1); font-weight: 800; }
.pt-vc-pp.is-say .pt-vc-mic { color: var(--ok-t); }
.pt-vc-pp.is-mute .pt-vc-mic { color: var(--vc-bad); }
.pt-vc-pp.is-deaf .pt-vc-main b, .pt-vc-pp.is-deaf .pt-vc-mic { color: var(--off); }
/* свой значок — кнопка: клик выключает (красный, перечёркнутый) / включает (#333-2) */
.pt-vc-micbtn { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.pt-vc-micbtn:hover { background: rgba(255,255,255,.10); }
.pt-vc-micbtn:focus-visible { outline: 2px solid var(--t1); outline-offset: 1px; }

.pt-vc-unlock { margin-top: 8px; }
.pt-vc-unlock[hidden] { display: none; }
/* «Пригласить» и «Выйти» — в одну строку */
.pt-vc-acts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); gap: 6px; margin-top: 10px; }
.pt-vc-acts .is-wide { width: auto; }

/* окна поверх списка */
.pt-vc-pop { position: absolute; left: 0; right: 0; z-index: 6; padding: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: var(--vc-pop); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.pt-vc-pop[hidden] { display: none; }
.pt-vc-pop-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--t1); font-size: 14px; font-weight: 800; }
.pt-vc-pop-t span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-vc-pop-t button { flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--t3); font-size: 16px; cursor: pointer; }
.pt-vc-pop-t button:hover { color: var(--t1); }
.pt-vc-pop .pt-vc-btn { margin-top: 10px; padding: 8px 6px; }
.pt-vc-lab { display: block; margin: 10px 0 4px; color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-vc-sel { width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--vc-field); color: var(--t2); font: inherit; font-size: 12px; font-weight: 700; }
.pt-vc-sel option { background: var(--vc-pop); color: var(--t2); }
.pt-vc-chk { display: flex; align-items: center; gap: 9px; padding: 5px 0; color: var(--t2); font-size: 12px; font-weight: 700; cursor: pointer; }
.pt-vc-chk input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: #e3e7ec; }
.pt-vc-chk small { margin-left: auto; color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-vc-vtop { display: flex; align-items: center; justify-content: space-between; color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-vc-vtop b { color: var(--t1); font-size: 12px; font-weight: 800; }
.pt-vc-range { display: block; width: 100%; margin: 6px 0 2px; accent-color: #e3e7ec; }
.pt-vc-marks { display: flex; justify-content: space-between; color: var(--off); font-size: 11px; font-weight: 700; }
.pt-vc-lvl { position: relative; height: 8px; margin: 4px 0 2px; border-radius: 2px; background: var(--vc-field); }
.pt-vc-lvl i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; max-width: 100%; border-radius: 2px; background: var(--ok-t); }
.pt-vc-lvl em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--vc-bad); }
.pt-vc-lvl em[hidden] { display: none; }
.pt-vc-hint { margin-top: 6px; color: var(--off); font-size: 11px; font-weight: 700; line-height: 1.35; }
.pt-vc-hint.is-err { color: var(--vc-bad); }
.pt-vc-grp { margin-bottom: 2px; color: var(--t2); font-size: 12px; font-weight: 700; }
.pt-vc-irow { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.pt-vc-mini { flex: none; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; background: none; color: var(--t1); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.pt-vc-mini:disabled { opacity: .5; cursor: default; }
.pt-vc-mini.is-done { border-color: transparent; color: var(--ok-t); cursor: default; }

/* друг: Play у «в игре» (пока только вид), меню ▾ */
.pt-friend { position: relative; }
.pt-friend-play { flex: none; display: inline-grid; place-items: center; width: 28px; height: 26px; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; color: var(--t1); font-size: 12px; }
.pt-friend-more { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-left: -4px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--t3); font-size: 15px; cursor: pointer; }
.pt-friend-more:hover, .pt-friend-more[aria-expanded="true"] { color: var(--t1); background: rgba(255,255,255,.06); }
.pt-friend-menu { position: absolute; right: 0; top: 34px; z-index: 5; width: 208px; padding: 4px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: var(--vc-pop); box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.pt-friend-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--t2); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.pt-friend-menu button i { color: var(--t3); font-size: 16px; }
.pt-friend-menu button:hover, .pt-friend-menu button:focus-visible { background: rgba(255,255,255,.08); color: var(--t1); outline: 0; }
.pt-friend-menu button:hover i { color: var(--t1); }
.pt-friend-menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--rline); }
.pt-friend-menu .is-del, .pt-friend-menu .is-del i { color: var(--vc-bad); }

/* уведомления стопкой внизу панели */
.pt-stack { position: sticky; bottom: 16px; z-index: 7; display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 12px; }
.pt-stack:empty, body:not(.pt-in) .pt-stack { display: none; }
.pt-nt { padding: 12px; border: 1px solid var(--rline); border-radius: 8px; background: #1c1f24; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
#ptRight.lt .pt-nt { background: #fff; }
.pt-nt-t { color: var(--t2); font-size: 14px; font-weight: 700; line-height: 1.35; }
.pt-nt-t b { color: var(--t1); font-weight: 800; }
.pt-nt-s { margin-top: 2px; color: var(--t3); font-size: 11px; font-weight: 700; }
.pt-nt-b { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 6px; margin-top: 10px; }

.pt-voice-audio { display: none; }
