/* ===== Кружки 2.0.7 ===== */
/* Сердце: path() в clip-path меряется в пикселях, поэтому на большом видео сердце было
   крошечным в углу. Для сердца используем только маску (она тянется по размеру). */
.circle-shape--heart { --circle-clip: none !important; }
.msg-video-inline-wrap--circle.circle-shape--heart .msg-video-stage,
.msg-video-inline-wrap--circle.circle-shape--heart .msg-inline-video--circle,
.circle-trim-video.circle-shape--heart,
#circleFilmVideo.circle-shape--heart { clip-path: none !important; }
#circleFilmVideo[class*="circle-shape--"]:not(.circle-shape--circle):not(.circle-shape--heart) { clip-path: var(--circle-clip); border-radius: 0 !important; }
#circleFilmVideo.circle-shape--heart, .recording-bar-preview-wrap.circle-shape--heart .record-preview-video {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92 C 20 70 2 52 2 30 C 2 14 14 4 28 4 C 38 4 46 10 50 18 C 54 10 62 4 72 4 C 86 4 98 14 98 30 C 98 52 80 70 50 92 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92 C 20 70 2 52 2 30 C 2 14 14 4 28 4 C 38 4 46 10 50 18 C 54 10 62 4 72 4 C 86 4 98 14 98 30 C 98 52 80 70 50 92 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Съёмка кружка: полноэкранный режим с кольцом прогресса --- */
html.mirage-circle-capture #recordingBar:not(.hidden) {
  position: fixed !important; inset: 0 !important; z-index: 2000; margin: 0 !important; max-width: none !important; width: auto !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom)) !important; border: 0 !important; border-radius: 0 !important;
  background: rgba(8, 10, 18, .62) !important; -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: none !important; color: #fff; animation: crIn .22s ease-out;
}
@keyframes crIn { from { opacity: 0; } }
html.mirage-circle-capture #recordPreviewWrap:not(.hidden) {
  --cr: min(76vw, 340px, 56vh); position: relative; flex: 0 0 auto !important; width: var(--cr) !important; height: var(--cr) !important; min-height: 0 !important; max-height: none !important; aspect-ratio: auto; margin: 0 !important; overflow: visible !important;
  background: transparent !important; box-shadow: none !important; border-radius: 0 !important; animation: crPop .35s cubic-bezier(.2,1.3,.4,1);
}
@keyframes crPop { from { transform: scale(.6); opacity: 0; } }
html.mirage-circle-capture #recordPreviewWrap .record-preview-video {
  position: absolute; inset: 6px; width: calc(100% - 12px) !important; height: calc(100% - 12px) !important; border-radius: 50%; object-fit: cover; background: #0f172a;
}
html.mirage-circle-capture #recordPreviewWrap[class*="circle-shape--"]:not(.circle-shape--circle):not(.circle-shape--heart) .record-preview-video { border-radius: 0; clip-path: var(--circle-clip); }
html.mirage-circle-capture #recordPreviewWrap.circle-shape--heart .record-preview-video { border-radius: 0; }
.rec-ring { display: none; }
html.mirage-circle-capture .rec-ring { display: block; position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.rec-ring circle { fill: none; stroke-width: 2.4; }
.rec-ring-bg { stroke: rgba(255, 255, 255, .18); }
.rec-ring-fg { stroke: #ef4444; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--rec-p, 0) * 100); transition: stroke-dashoffset 1s linear; filter: drop-shadow(0 0 4px rgba(239, 68, 68, .7)); }
html.mirage-circle-capture #recordFlipCameraBtn { bottom: 18px !important; background: rgba(0, 0, 0, .45) !important; color: #fff; border: 0; width: 40px; height: 40px; }
html.mirage-circle-capture #recordingBar .recording-bar-main {
  width: min(420px, 100%); justify-content: center; gap: 12px; padding: 10px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff;
}
html.mirage-circle-capture #recordingBar .rec-time { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
html.mirage-circle-capture #recordingBar #recordingLabel { opacity: .8; font-size: 13px; }
html.mirage-circle-capture #recordingBar .recording-level { display: none !important; }
html.mirage-circle-capture #recordingBar .rec-ctl { color: #fff; }
html.mirage-circle-capture #recordingBar .rec-ctl--review { background: rgba(255, 255, 255, .16); color: #fff; border: 0; }
html.mirage-circle-capture #recordingBar .rec-ctl--trash .ui-icon { background-color: #fca5a5; }
html.mirage-circle-capture #circleLockRail:not(.hidden) { z-index: 2001; }
html.mirage-circle-capture.layout-desktop #recordingBar:not(.hidden) { position: fixed !important; }
@media (prefers-reduced-motion: reduce) { html.mirage-circle-capture #recordingBar, html.mirage-circle-capture #recordPreviewWrap { animation: none; } }
