/* ClipWa: стили плееров медиа в чате (25.11.2026). Тёмная тема — по умолчанию, светлая — html[data-theme="light"] или body.cp. */
.cm-audio, .cm-video {
  --cm-bg: rgba(8,8,14,.55);
  --cm-bd: rgba(255,255,255,.12);
  --cm-tx: #eeeef2;
  --cm-mut: #9d9da8;
  --cm-bar: #33333f;
  --cm-acc: #a274ff;
  --cm-acc2: #7d5cf5;
  display: flex;
  width: 100%;
  max-width: 620px;
  margin: 10px 0;
  border: 1px solid var(--cm-bd);
  border-radius: 14px;
  background: var(--cm-bg);
  color: var(--cm-tx);
}
html[data-theme="light"] .cm-audio, html[data-theme="light"] .cm-video,
body.cp .cm-audio, body.cp .cm-video {
  --cm-bg: #fbfaf6;
  --cm-bd: #e4dfd2;
  --cm-tx: #1b1916;
  --cm-mut: #7a756a;
  --cm-bar: #ded8c9;
  --cm-acc: #7c5cf0;
  --cm-acc2: #6a4ae8;
}
.cm-audio { align-items: center; gap: 12px; padding: 10px 12px; }
.cm-li { list-style: none; }
.nc-artifacts .cm-audio, .nc-artifacts .cm-video, .cp-files .cm-audio, .cp-files .cm-video { margin: 4px 0; }
.cm-play {
  flex: none; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cm-acc2), var(--cm-acc));
  color: #fff;
  box-shadow: 0 5px 16px rgba(125,92,245,.30);
  transition: transform .12s, filter .15s;
}
.cm-play:hover { filter: brightness(1.07); transform: scale(1.04); }
.cm-play:active { transform: scale(.95); }
.cm-play svg { display: block; }
.cm-a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cm-a-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cm-a-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13.5px; font-weight: 600; color: var(--cm-tx); text-decoration: none;
}
.cm-a-name:hover { color: var(--cm-acc); }
.cm-a-badge {
  flex: none; font-size: 11.5px; color: var(--cm-mut);
  border: 1px solid var(--cm-bd); border-radius: 999px; padding: 1px 7px;
  font-variant-numeric: tabular-nums;
}
.cm-a-bars {
  display: flex; align-items: center; gap: 1px; height: 34px;
  cursor: pointer; min-width: 0; outline: none;
}
.cm-a-bars:focus-visible { box-shadow: 0 0 0 2px var(--cm-acc) inset; border-radius: 4px; }
.cm-bar {
  flex: 1; min-width: 1px; border-radius: 1px; min-height: 3px;
  background: var(--cm-bar); transition: background .1s;
}
.cm-bar.on { background: var(--cm-acc); }
.cm-a-foot { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cm-a-time { font-size: 11.5px; color: var(--cm-mut); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cm-a-note { font-size: 11.5px; color: var(--cm-mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-a-more {
  margin-left: auto; flex: none; border: 1px solid var(--cm-bd); background: transparent;
  color: var(--cm-mut); border-radius: 999px; padding: 2px 9px; font-size: 11.5px; cursor: pointer;
}
.cm-a-more:hover { color: var(--cm-tx); border-color: var(--cm-acc); }
.cm-audio.cm-bad { opacity: .75; }
.cm-audio .cm-a-audio { display: none; }
.cm-video { flex-direction: column; overflow: hidden; }
.cm-video-el {
  display: block; width: 100%; max-height: min(64vh, 460px);
  background: #000; object-fit: contain;
}
.cm-video-foot {
  display: flex; align-items: center; gap: 10px; padding: 7px 11px;
  border-top: 1px solid var(--cm-bd); font-size: 12.5px;
}
.cm-video-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--cm-tx); text-decoration: none; font-weight: 600;
}
.cm-video-name:hover { color: var(--cm-acc); }
.cm-video-open { flex: none; color: var(--cm-acc); text-decoration: none; }
.cm-video-open:hover { text-decoration: underline; }
.cm-video.cm-bad .cm-video-el { display: none; }
@media (max-width: 560px) {
  .cm-audio { gap: 10px; padding: 9px 10px; }
  .cm-play { width: 36px; height: 36px; }
  .cm-a-note { display: none; }
  .cm-video-el { max-height: 58vh; }
}
