/* Вложения чата заведения: показ в сообщении и кнопки в строке ввода (js/chat-media.js). Цвета — от темы страницы. */
.cm-media { display: block; margin: 2px 0 4px; max-width: 100%; }
.cm-image img { display: block; max-width: min(100%, 280px); max-height: 320px; border-radius: 10px; object-fit: cover; background: rgba(127, 127, 127, .15); }
.cm-video video { display: block; width: min(100%, 300px); max-height: 340px; border-radius: 10px; background: #000; }
.cm-audio { display: flex; align-items: center; gap: 8px; }
.cm-audio audio { width: min(100%, 260px); height: 40px; }
.cm-dur { font-size: .75rem; opacity: .7; font-variant-numeric: tabular-nums; }

.cm-tools { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.cm-btn { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; opacity: .7; transition: opacity .12s, background .12s; }
.cm-btn:hover, .cm-btn:focus-visible { opacity: 1; background: rgba(127, 127, 127, .16); }
.cm-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cm-btn.is-rec { color: #c0392b; opacity: 1; }
.cm-tools.is-busy { opacity: .45; pointer-events: none; }

.cm-rec { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.cm-rec[hidden] { display: none; }
.cm-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #c0392b; animation: cm-pulse 1s ease-in-out infinite; }
.cm-rec-time { font-variant-numeric: tabular-nums; margin-right: auto; }
.cm-rec button { min-height: 36px; padding: 0 14px; border: 1px solid rgba(127, 127, 127, .4); border-radius: 18px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.cm-rec .cm-rec-send { background: var(--yoi-green, #2d803a); border-color: transparent; color: #fff; }
@keyframes cm-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cm-rec-dot { animation: none; } }
