/* COOL Chat: виджет чата на сайте. Цвета берутся из COOL Skin (--cs-*), тёмная и светлая тема переключаются сами. */
.cw,.cw *{box-sizing:border-box}
.cw{font-family:var(--cs-body,'Manrope',system-ui,Arial,sans-serif);color:var(--cs-text,#16161C);font-size:14px;line-height:1.4}
.cw button,.cw textarea,.cw input{font-family:inherit}

.cw-launch{position:fixed;z-index:99990;bottom:var(--cw-bottom,90px);width:58px;height:58px;padding:0;border:0;border-radius:50%;background:var(--cw-color,#F5C400);color:var(--cw-on,#111);box-shadow:0 10px 28px rgba(0,0,0,.28);cursor:pointer;display:grid;place-items:center;transition:transform .15s ease}
.cw-launch:hover{transform:scale(1.06)}
.cw-launch svg{width:27px;height:27px}
.cw-right .cw-launch{right:var(--cw-side,16px)}
.cw-left .cw-launch{left:var(--cw-side,16px)}
.cw-badge{position:absolute;top:-5px;right:-5px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#ef4444;color:#fff;font-size:12px;font-weight:800;line-height:22px;text-align:center}
.cw-pop{position:fixed;z-index:99991;bottom:calc(var(--cw-bottom,90px) + 72px);max-width:260px;padding:10px 14px;border-radius:16px;background:var(--cs-surface,#fff);color:var(--cs-text,#16161C);border:1px solid var(--cs-line,#DCDCE3);box-shadow:0 12px 30px rgba(0,0,0,.2);cursor:pointer;font-size:13px;display:none}
.cw-right .cw-pop{right:var(--cw-side,16px)}
.cw-left .cw-pop{left:var(--cw-side,16px)}

.cw-panel{position:fixed;z-index:99992;bottom:calc(var(--cw-bottom,90px) + 72px);width:370px;max-width:calc(100vw - 20px);height:min(580px,calc(100vh - var(--cw-bottom,90px) - 96px));display:none;flex-direction:column;background:var(--cs-surface,#fff);border:1px solid var(--cs-line,#DCDCE3);border-radius:22px;box-shadow:0 24px 60px rgba(0,0,0,.32);overflow:hidden}
.cw-right .cw-panel{right:var(--cw-side,16px)}
.cw-left .cw-panel{left:var(--cw-side,16px)}
.cw-panel.is-open{display:flex}

.cw-hd{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--cw-color,#F5C400);color:var(--cw-on,#111)}
.cw-av{position:relative;flex:none;width:40px;height:40px;border-radius:50%;background:rgba(0,0,0,.14);display:grid;place-items:center;font-size:20px}
.cw-av::after{content:"";position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#9ca3af;border:2px solid var(--cw-color,#F5C400)}
.cw-online .cw-av::after{background:#22c55e}
.cw-ht{flex:1;min-width:0}
.cw-title{font-weight:800;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-sub{font-size:12px;opacity:.8}
.cw-x{flex:none;width:34px;height:34px;border:0;border-radius:50%;background:rgba(0,0,0,.12);color:inherit;font-size:20px;line-height:1;cursor:pointer}

.cw-ms{flex:1;min-height:0;overflow-y:auto;padding:14px;background:var(--cs-bg,#F6F6F8)}
.cw-m{display:flex;margin:7px 0}
.cw-m--me{justify-content:flex-end}
.cw-b{max-width:82%;padding:8px 12px;border-radius:16px;background:var(--cs-surface,#fff);border:1px solid var(--cs-line,#DCDCE3);color:var(--cs-text,#16161C);white-space:pre-wrap;overflow-wrap:anywhere;word-wrap:break-word}
.cw-m--me .cw-b{background:var(--cw-color,#F5C400);border-color:var(--cw-color,#F5C400);color:var(--cw-on,#111)}
.cw-b a{color:inherit;text-decoration:underline}
.cw-t{display:block;margin-top:3px;font-size:10px;opacity:.6;text-align:right}
.cw-img{display:block;max-width:100%;max-height:240px;border-radius:12px;margin-bottom:4px;cursor:zoom-in}
.cw-vid{display:block;width:100%;max-width:260px;border-radius:12px;margin-bottom:4px;background:#000}
.cw-file{display:inline-block;margin-bottom:4px;padding:7px 10px;border-radius:10px;background:rgba(0,0,0,.08);font-weight:700}
.cw-note{margin:8px 0;padding:9px 12px;border-radius:12px;background:var(--cs-surface2,#ECECF0);color:var(--cs-muted,#5E5E6B);font-size:12px}

.cw-ft{position:relative;padding:10px 12px 12px;border-top:1px solid var(--cs-line,#DCDCE3);background:var(--cs-surface,#fff)}
.cw-who{display:none;gap:6px;margin-bottom:8px}
.cw-who.show{display:flex}
.cw-who input{flex:1;min-width:0;height:36px;padding:0 10px;border:1px solid var(--cs-line,#DCDCE3);border-radius:10px;background:var(--cs-surface2,#ECECF0);color:var(--cs-text,#16161C);font-size:13px}
.cw-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:6px}
.cw-chip{display:flex;align-items:center;gap:6px;padding:4px 8px;border-radius:10px;background:var(--cs-surface2,#ECECF0);font-size:12px}
.cw-chip img{width:26px;height:26px;object-fit:cover;border-radius:6px}
.cw-chip button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:16px;line-height:1}
.cw-bar{height:3px;margin-top:3px;border-radius:2px;background:var(--cw-color,#F5C400);width:0}
.cw-row{display:flex;align-items:flex-end;gap:6px}
.cw-ic{flex:none;width:38px;height:38px;border:0;border-radius:12px;background:var(--cs-surface2,#ECECF0);color:inherit;font-size:19px;cursor:pointer}
.cw-text{flex:1;min-width:0;min-height:38px;max-height:120px;padding:8px 12px;border:1px solid var(--cs-line,#DCDCE3);border-radius:14px;background:var(--cs-surface2,#ECECF0);color:var(--cs-text,#16161C);font-size:15px;resize:none}
.cw-send{flex:none;width:42px;height:38px;border:0;border-radius:12px;background:var(--cw-color,#F5C400);color:var(--cw-on,#111);font-size:17px;font-weight:800;cursor:pointer}
.cw-send[disabled]{opacity:.5}
.cw-emo{position:absolute;left:12px;right:12px;bottom:calc(100% + 4px);max-height:210px;overflow:auto;padding:8px;display:none;background:var(--cs-surface,#fff);border:1px solid var(--cs-line,#DCDCE3);border-radius:14px;box-shadow:0 12px 30px rgba(0,0,0,.22)}
.cw-emo.show{display:block}
.cw-emo button{width:36px;height:36px;border:0;background:transparent;font-size:22px;border-radius:8px;cursor:pointer}
.cw-emo button:hover{background:var(--cs-surface2,#ECECF0)}
.cw-off{display:none;margin:0 0 8px;font-size:12px;color:var(--cs-muted,#5E5E6B)}
.cw-off.show{display:block}

@media (max-width:600px){
  .cw-panel{top:0;left:0!important;right:0!important;bottom:0;width:100%;max-width:none;height:100%;border-radius:0}
  .cw-ms{padding:12px}
}
@media (prefers-reduced-motion:reduce){.cw-launch{transition:none}}
