.chats-view .cm-card { display:grid; grid-template-columns:minmax(0,1fr); gap:7px; min-width:0; max-width:100%; margin:0 0 6px; }
.chats-view .cm-icon { flex:none; width:18px; height:18px; vertical-align:middle; }
.chats-view .cm-photo { display:grid; place-items:center; padding:0; min-width:0; max-width:100%; width:100%; border:0; border-radius:10px; overflow:hidden; background:#142330; color:inherit; cursor:zoom-in; }
.chats-view .cm-photo img { display:block; width:auto; height:auto; max-width:min(320px,100%); max-height:min(340px,45vh); object-fit:contain; }
.chats-view .cm-card.cm-file {
  grid-template-columns:42px minmax(0,1fr); align-items:center; gap:10px;
  width:246px; max-width:100%; margin:2px 0 3px;
}
.chats-view .cm-file-download {
  display:grid; place-items:center; width:42px; height:42px; border-radius:50%;
  color:#1b2d38; background:#acbfcd; text-decoration:none;
}
.chats-view .cm-file-download:hover { background:#ccdeea; }
.chats-view .cm-file-download .cm-icon { width:22px; height:22px; stroke-width:2.5; }
.chats-view .cm-file-details { min-width:0; line-height:1.4; }
.chats-view .cm-file-title { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#f0f3f6; font-size:14px; font-weight:600; }
.chats-view .cm-file-meta { margin-top:1px; color:#bdcbd5; font-size:13px; }
.chats-view .cm-file-link { color:#8ed0ff; text-decoration:none; }
.chats-view .cm-file-link:hover { text-decoration:underline; }
.chats-view .cm-draft { display:flex; align-items:center; gap:9px; min-width:0; max-width:100%; }
.chats-view .cm-file-symbol { display:grid; flex:0 0 auto; place-items:center; width:37px; height:37px; background:#38749a; color:#f3faff; border-radius:50%; }
.chats-view .cm-file-info { display:flex; flex:1 1 auto; flex-direction:column; min-width:0; line-height:1.3; }
.chats-view .cm-file-info strong { font-size:13px; font-weight:550; overflow-wrap:anywhere; }
.chats-view .cm-file-info small { color:#b5c6d3; font-size:11px; }
.chats-view .cm-copy,.chats-view .cm-draft button {
  display:inline-flex; align-items:center; justify-content:center; border:0; background:transparent; color:#abdfff; cursor:pointer; text-decoration:none;
}
.chats-view .cm-copy {
  width:100%; min-width:0; min-height:34px; box-sizing:border-box; gap:7px; padding:6px 10px;
  border:1px solid rgba(151,208,247,.28); border-radius:8px; background:rgba(157,206,241,.10);
  color:#b4e2ff; font:inherit; font-size:13px; font-weight:500; line-height:1.25; text-align:center;
}
.chats-view .cm-copy .cm-icon { width:16px; height:16px; }
.chats-view .cm-copy:hover { background:rgba(157,206,241,.19); border-color:rgba(151,208,247,.5); }
.chats-view .cm-copy:focus-visible,.chats-view .cm-photo:focus-visible,.chats-view .cm-file a:focus-visible { outline:2px solid #8fd1ff; outline-offset:1px; }
.chats-view .cm-draft button:hover { background:rgba(156,210,247,.12); }
.chats-view .cm-copy:disabled,.chats-view .cm-draft button:disabled { opacity:.6; }
.chats-view .chats-attachment:has(.cm-draft) { display:block; margin:0 0 6px; padding:0; border:0; }
.chats-view .cm-draft { width:100%; padding:6px 9px; background:rgba(65,140,186,.1); box-sizing:border-box; border-inline-start:3px solid #55b2ea; border-radius:5px; }
.chats-view .cm-draft .cm-file-info strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chats-view .cm-draft .cm-file-symbol,.chats-view .cm-draft-photo { width:38px; height:38px; }
.chats-view .cm-draft-photo { flex:none; object-fit:cover; border-radius:5px; }
.chats-view .cm-draft button { width:28px; height:28px; border-radius:50%; }
.chats-view .cm-viewer {
  position:fixed; inset:0; z-index:100; width:100vw; height:100vh; height:100dvh; max-width:none; max-height:none; margin:0; padding:0; box-sizing:border-box;
  border:0; border-radius:0; background:rgba(9,14,19,.97); color:white;
}
.chats-view .cm-viewer[open] { display:flex; flex-direction:column; }
.chats-view .cm-viewer::backdrop { background:#10151b; }
.chats-view .cm-viewer header { display:flex; align-items:center; gap:8px; padding:8px clamp(8px,2.5vw,32px); padding-top:max(8px,env(safe-area-inset-top)); background:#17212b; }
.chats-view .cm-viewer header strong { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; font-weight:500; }
.chats-view .cm-viewer header button,.chats-view .cm-viewer header a { display:grid; place-items:center; width:38px; height:38px; flex:none; border:0; border-radius:50%; background:transparent; color:inherit; }
.chats-view .cm-viewer header button:hover,.chats-view .cm-viewer header a:hover { background:#30404f; }
.chats-view .cm-stage { flex:1; min-height:0; min-width:0; overflow:auto; display:flex; padding:8px; }
.chats-view .cm-stage img { max-width:100%; max-height:100%; width:auto; height:auto; object-fit:contain; margin:auto; flex:none; }
.chats-view .cm-zoomed .cm-stage img { max-width:none; max-height:none; }
.chats-view .cm-draft button.cm-draft-review { display:flex; flex:1 1 auto; justify-content:flex-start; gap:9px; width:auto; height:auto; min-width:0; padding:0; border-radius:4px; text-align:left; color:inherit; }
.chats-view .cm-review { position:fixed; inset:0; width:min(460px,calc(100vw - 24px)); max-width:100%; max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px);
  margin:auto; padding:0; box-sizing:border-box; overflow:auto; border:1px solid #405163; border-radius:14px; color:#e8eef4; background:#202c38; box-shadow:0 14px 65px #0008; }
.chats-view .cm-review::backdrop { background:rgba(5,10,16,.72); }
.chats-view .cm-review form { display:flex; flex-direction:column; gap:10px; padding:16px; }
.chats-view .cm-review header,.chats-view .cm-review footer,.chats-view .cm-review-meta { display:flex; gap:10px; align-items:center; min-width:0; }
.chats-view .cm-review header h2 { flex:1; margin:0; font-size:18px; font-weight:600; }
.chats-view .cm-review button { border:0; color:#bce3ff; background:transparent; border-radius:8px; cursor:pointer; }
.chats-view .cm-review header button { display:grid; place-items:center; width:32px; height:32px; }
.chats-view .cm-review-stage { display:flex; justify-content:center; align-items:center; min-height:40px; max-height:min(48vh,480px); border-radius:9px; overflow:hidden; background:#15202a; }
.chats-view .cm-review-stage img { max-width:100%; max-height:min(48vh,480px); width:auto; height:auto; object-fit:contain; }
.chats-view .cm-review-meta .cm-file-info strong { font-size:14px; }
.chats-view .cm-review label { display:flex; flex-direction:column; gap:4px; color:#9dbad0; font-size:12px; }
.chats-view .cm-review textarea { width:100%; min-width:0; min-height:38px; max-height:20vh; resize:vertical; box-sizing:border-box;
  background:#18242f; border:1px solid #405468; border-radius:7px; padding:8px; color:#f0f5f9; font-size:14px; }
.chats-view .cm-review [data-cm-review-error] { margin:0; font-size:12px; color:#ffb0ae; }
.chats-view .cm-review footer { justify-content:flex-end; }
.chats-view .cm-review footer button { min-height:36px; padding:5px 14px; font-size:14px; }
.chats-view .cm-review button:hover { background:#364858; }
.chats-view .cm-review .cm-review-send { color:#fff; background:#287bb3; }
.chats-view .cm-review .cm-review-send:hover { background:#348bc4; }
.chats-view .cm-review button:disabled { opacity:.55; cursor:wait; }
@media (max-height:520px) {
  .chats-view .cm-review form { gap:5px; padding:10px; }
  .chats-view .cm-review-stage,.chats-view .cm-review-stage img { max-height:27vh; }
}
