/* Плееры используют палитру кабинета и не изменяют размеры превью. */
.cabinet-video-player { position:relative; isolation:isolate; }
.cabinet-video-player [hidden],.record-voice-player[hidden],.record-video-player[hidden] { display:none!important; }
.video-controls { position:absolute; left:0; right:0; bottom:0; z-index:3; display:flex; align-items:center; gap:3px; padding:2px 6px; min-height:32px; background:linear-gradient(transparent,#000d); color:#fff; }
.video-controls .player-button { display:grid; place-items:center; flex:none; width:28px; height:28px; padding:5px; border:0; border-radius:50%; background:transparent; color:#e1e2e5; }
.player-button svg { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }

.video-controls .player-button:focus-visible,.video-controls .player-button:hover { background:#ffffff26; outline:1px solid #fff8; }
.video-controls .player-seek { flex:1; min-width:20px; width:0; height:28px; margin:0 3px; padding:0; appearance:none; -webkit-appearance:none; --seek-position:0%; --seek-played:#b7bac1; --seek-rest:#e3e4e8; --seek-thumb:#f5f5f7; border:0; border-radius:0; background:transparent; box-shadow:none; cursor:pointer; }
.video-controls .player-time { flex:none; font:11px/1.2 system-ui,sans-serif; font-variant-numeric:tabular-nums; white-space:nowrap; }
.player-status { position:absolute; z-index:4; top:42px; left:8px; right:8px; padding:5px 8px; border-radius:6px; background:#000b; color:#fff; font-size:12px; text-align:center; overflow-wrap:anywhere; pointer-events:none; }
.voice-error { display:block; margin-top:5px; font-size:12px; color:#a43e3e; overflow-wrap:anywhere; }
.voice-error[hidden] { display:none; }
body .message-with-video:not(:has(>.message-text))>.message-meta { bottom:40px; }
.record-video-player { width:min(100%,520px); height:clamp(140px,40dvh,340px); flex-shrink:0; overflow:hidden; border-radius:14px; background:#e8e8eb; }
.record-video-player .record-preview { display:block; width:100%; height:100%; max-height:none; object-fit:contain; background:transparent; }
.record-voice-player { --green:var(--chat-accent,#53b559); --muted:var(--chat-muted,#505b54); max-width:100%; min-height:70px; margin:12px auto; }
.record-voice-player .voice-play { width:44px; height:44px; color:#fff; background:var(--green); }
.cabinet-video-player:fullscreen { width:100vw!important; height:100dvh!important; max-width:none!important; max-height:none!important; aspect-ratio:auto!important; background:#000; border-radius:0!important; }
.cabinet-video-player:fullscreen video { width:100%; height:100%; max-height:none; object-fit:contain; }
.recorder-actions button { flex-direction:column; gap:6px; min-height:76px; }
.recorder-actions button svg { flex:none; display:block; width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.recorder-actions #recordStart { flex-direction:column; gap:6px; }
.recorder-actions #recordStart svg { width:26px; height:26px; fill:#bf4f4f; stroke:none; }
.recorder-actions #recordStart[data-recording=true] { background:var(--accent2,#ececec); color:var(--ink,#202123); }
.recorder-actions #recordStart[data-recording=true] svg { fill:#328a40; }
@media(max-width:720px){
 .recorder-panel .recorder-actions button { min-height:80px; flex-direction:column; gap:6px; font-size:13px; }
 .recorder-panel #recordStart { gap:6px; }
 .record-video-player { height:clamp(100px,37dvh,340px); }
}
#appView .video-controls .player-button { background:transparent; color:#e1e2e5; }
#appView .video-controls .player-button:hover { background:#ffffff26; color:#fff; }
#appView .cabinet-video-player>.video-play,.record-video-player>.video-play { background:var(--chat-accent,#53b559); color:#fff; }
.cabinet-video-player>.video-play svg { fill:currentColor; stroke:none; }
#appView .video-controls .player-seek { min-width:20px; width:0; height:28px; padding:0; border:0; background:transparent; }
.cabinet-video-player { container-type:inline-size; }
@container(max-width:210px){ .video-controls .player-time { font-size:10px; } }
@container(max-width:150px){
 .video-controls { flex-wrap:wrap; gap:0 2px; padding-inline:4px; }
 .video-controls .player-button { width:24px; height:28px; padding:3px; }
 .video-controls .player-time { margin-right:auto; }
 .video-controls .player-seek,#appView .video-controls .player-seek { flex-basis:100%; width:100%; min-width:8px; height:14px; margin-inline:0; }
}


.message-unread-divider { display:flex; justify-content:center; margin:8px 0; pointer-events:none; }


/* Тонкая двухцветная шкала, отдельная от удобной области нажатия. */
.video-controls .player-seek::-webkit-slider-runnable-track { height:3px; border-radius:2px; background:linear-gradient(to right,var(--seek-played) 0 var(--seek-position),var(--seek-rest) var(--seek-position) 100%); }
.video-controls .player-seek::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:9px; height:9px; margin-top:-3px; border:1px solid #b7bac1; border-radius:50%; background:var(--seek-thumb); box-shadow:0 0 2px #0003; }
.video-controls .player-seek::-moz-range-track { height:3px; border-radius:2px; background:var(--seek-rest); }
.video-controls .player-seek::-moz-range-progress { height:3px; border-radius:2px; background:var(--seek-played); }
.video-controls .player-seek::-moz-range-thumb { width:8px; height:8px; border:1px solid #b7bac1; border-radius:50%; background:var(--seek-thumb); }
.video-controls .player-seek:focus-visible { outline:2px solid #f1f1f4; outline-offset:0; }

/* Opaque corners replace Telegram's baked-in video-note decoration. */
.cabinet-video-player.telegram-video-note {
 background:radial-gradient(circle at 50% 50%,#565061 0%,#302b3d 65%,#111019 100%);
}
.media .telegram-video-note video { clip-path:circle(49.8% at 50% 50%); }
.cabinet-video-player.telegram-video-note:fullscreen {
 background:radial-gradient(circle at 50% 50%,#565061 0%,#302b3d 65%,#111019 100%);
}
.cabinet-video-player.telegram-video-note:fullscreen video {
 inset:auto; left:50%; top:50%; width:min(100vw,100dvh); height:min(100vw,100dvh);
 transform:translate(-50%,-50%); clip-path:circle(49.8% at 50% 50%);
}
