/* WorkLine 1.9.74 — запись голоса удержанием и звонки в личных чатах */
.chat-rec-btn { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* запись голоса: удержание */
.chat-rec-hold { position: fixed; z-index: 10150; box-sizing: border-box; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--card); border-radius: 22px; pointer-events: none; }
.chat-rec-hold[hidden], .chat-rec-lock[hidden] { display: none !important; }
.chat-rec-hold b { font-variant-numeric: tabular-nums; font-size: 16px; min-width: 40px; }
.chat-rec-hint { flex: 1; min-width: 0; text-align: right; font-size: 13px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-rec-hold.will-cancel .chat-rec-hint { color: var(--danger); opacity: 1; font-weight: 700; }
.chat-rec-lock { position: fixed; z-index: 10150; transform: translateX(-50%) translateY(calc(var(--p, 0) * -22px)); width: 40px; padding: 8px 0 12px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--border); color: var(--primary); display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: calc(.6 + var(--p, 0) * .4); pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.chat-rec-lock i { width: 8px; height: 8px; border-top: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); margin-top: 2px; opacity: calc(1 - var(--p, 0)); }

/* ---------- окно звонка ---------- */
.wl-call { position: fixed; inset: 0; z-index: 10300; display: flex; flex-direction: column; align-items: center; background: #0b0e14; color: #fff; opacity: 0; transition: opacity .2s ease; overflow: hidden; }
.wl-call.open { opacity: 1; }
.wl-call[hidden] { display: none !important; }
.wl-call-remote { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0e14; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.wl-call.has-remote-video .wl-call-remote { opacity: 1; }
.wl-call-shade { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 0%, rgba(var(--primary-rgb), .38), rgba(11, 14, 20, 0) 60%), linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, .55)); }
.wl-call-top { position: relative; z-index: 2; margin-top: calc(14vh + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 0 24px; pointer-events: none; }
.wl-call.has-remote-video .wl-call-top,
.wl-call.is-video.self-full .wl-call-top { margin-top: calc(18px + env(safe-area-inset-top)); flex-direction: column; align-items: flex-start; gap: 2px; align-self: flex-start; text-align: left; max-width: calc(100% - 134px); }
.wl-call.has-remote-video .wl-call-av,
.wl-call.is-video.self-full .wl-call-av { display: none; }
.wl-call-av .wl-avatar { width: 120px; height: 120px; font-size: 46px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
.wl-call-name { font-size: 24px; font-weight: 800; letter-spacing: -.2px; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.wl-call-status { font-size: 15px; opacity: .85; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.wl-call[data-state="incoming"] .wl-call-status, .wl-call[data-state="calling"] .wl-call-status { animation: wlCallPulse 1.6s ease-in-out infinite; }
@keyframes wlCallPulse { 50% { opacity: .45; } }
.wl-call-self { position: absolute; z-index: 3; right: 14px; top: calc(14px + env(safe-area-inset-top)); width: 104px; height: 140px; object-fit: cover; border-radius: 16px; background: #1a1f2b; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); transform: scaleX(-1); display: none; cursor: pointer; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.wl-call[data-facing="environment"] .wl-call-self { transform: none; }
.wl-call.is-video:not([data-state="incoming"]) .wl-call-self { display: block; }
.wl-call.is-video:not([data-state="incoming"]).self-full .wl-call-self { inset: 0; right: 0; top: 0; width: 100%; height: 100%; border-radius: 0; box-shadow: none; z-index: 0; }
.wl-call.is-video:not([data-state="incoming"]).self-full.has-remote-video .wl-call-remote { inset: auto; left: auto; bottom: auto; right: 14px; top: calc(14px + env(safe-area-inset-top)); width: 104px; height: 140px; border-radius: 16px; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); z-index: 3; pointer-events: auto; cursor: pointer; }
.wl-call.cam-off .wl-call-self { opacity: .25; }
.wl-call-bar { position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(28px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: flex-start; gap: 18px; padding: 0 16px; }
.wl-call-b { width: 72px; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wl-call-b > span, .wl-call-b > svg { width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-sizing: border-box; }
.wl-call-b > svg { padding: 17px; }
.wl-call-b small { font-size: 12px; opacity: .8; white-space: nowrap; }
.wl-call-b:active > span, .wl-call-b:active > svg { background: rgba(255, 255, 255, .3); }
.wl-call-b .off { display: none; }
.wl-call-b[aria-pressed="true"] .on { display: none; }
.wl-call-b[aria-pressed="true"] .off { display: inline-flex; }
.wl-call-b[aria-pressed="true"] > span { background: #fff; color: #0b0e14; }
.wl-call-b.is-end > svg { background: #e5484d; }
.wl-call-b.is-ok > svg { background: #30a46c; }
.wl-call.is-video .wl-call-bar:not(.wl-call-in) { gap: 8px; padding: 0 10px; }
.wl-call.is-video .wl-call-b { flex: 1 1 0; width: auto; max-width: 68px; min-width: 0; gap: 6px; }
.wl-call.is-video .wl-call-b > span,
.wl-call.is-video .wl-call-b > svg { width: 52px; height: 52px; }
.wl-call.is-video .wl-call-b > svg { padding: 14px; }
.wl-call.is-video .wl-call-b small { font-size: 11px; }
/* какие кнопки когда */
.wl-call-in { display: none; }
.wl-call[data-state="incoming"] .wl-call-bar:not(.wl-call-in) { display: none; }
.wl-call[data-state="incoming"] .wl-call-in { display: flex; gap: 64px; }
.wl-call[data-state="incoming"] .wl-call-b { flex: 0 0 auto; width: 76px; max-width: none; }
.wl-call[data-state="incoming"] .wl-call-b > svg { width: 62px; height: 62px; padding: 17px; }
.wl-call[data-state="incoming"] .wl-call-b small { font-size: 13px; }
.wl-call[data-kind="audio"] [data-c="cam"], .wl-call[data-kind="audio"] [data-c="flip"] { display: none; }
.wl-call[data-state="ended"] .wl-call-bar { opacity: .35; pointer-events: none; }
@media (min-width: 900px) {
    .wl-call:not(.self-full) .wl-call-self,
    .wl-call.is-video.self-full.has-remote-video .wl-call-remote { width: 180px; height: 135px; }
    .wl-call.has-remote-video .wl-call-top,
    .wl-call.is-video.self-full .wl-call-top { max-width: calc(100% - 210px); }
}

/* кнопки звонков в шапке личного чата */
.chat-head-btn.chat-call-btn { color: var(--primary); }
