/* Окно «Напишите нам» на сайте: чат с поддержкой и ссылки в мессенджеры */
.cw { position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: "Golos Text", system-ui, sans-serif; }
.cw-up .cw { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.cw-btn { position: relative; width: 58px; height: 58px; border: 0; border-radius: 50%; background: #FBC503; color: #25282D; cursor: pointer; box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.cw-btn svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cw-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 2px #fff; }
.cw-dot[hidden] { display: none; }
.cw-panel { display: flex; flex-direction: column; width: min(360px, calc(100vw - 36px)); max-height: min(600px, calc(100dvh - 110px)); border-radius: 18px; background: #fff; color: #25282D;
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .45); overflow: hidden; padding: 0; }
.cw-panel[hidden] { display: none; }
.cw-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 10px 16px; border-bottom: 1px solid #ECEDF0; }
.cw-top b { font-size: 1.05rem; }
.cw-x { width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; color: #6B7078; cursor: pointer; display: grid; place-items: center; }
.cw-x:hover { background: #F4F5F7; color: #25282D; }
.cw-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cw-feed { flex: 1; min-height: 150px; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #F5F6F8; }
.cw-empty { margin: auto 4px; color: #6B7078; font-size: .92rem; text-align: center; line-height: 1.45; }
.cw-msg { max-width: 84%; padding: 8px 12px; border-radius: 14px; font-size: .94rem; line-height: 1.4; overflow-wrap: anywhere; }
.cw-msg small { display: block; margin-top: 3px; color: #6B7078; font-size: .74rem; }
.cw-msg.me { align-self: flex-end; background: #FFF3BF; border-bottom-right-radius: 4px; }
.cw-msg.them { align-self: flex-start; background: #fff; border: 1px solid #E3E5E9; border-bottom-left-radius: 4px; }
.cw-form { padding: 10px 12px; border-top: 1px solid #ECEDF0; display: grid; gap: 8px; }
.cw-who { display: grid; gap: 8px; }
.cw-who[hidden] { display: none; }
.cw-form input, .cw-form textarea { width: 100%; margin: 0; padding: 10px 12px; border: 1px solid #E3E5E9; border-radius: 10px; background: #fff; color: #25282D; font: 1rem/1.3 inherit; font-family: inherit; box-sizing: border-box; }
.cw-form input:focus, .cw-form textarea:focus { outline: 2px solid #FBC503; outline-offset: 0; border-color: #FBC503; }

.cw-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cw-row { display: flex; gap: 6px; align-items: flex-end; }
.cw-row textarea { flex: 1; min-width: 0; margin: 0; box-sizing: border-box; min-height: 42px; max-height: 120px; padding: 10px 14px; border-radius: 21px; resize: none; line-height: 1.35; }
.cw-clip { flex: none; margin: 0; padding: 0; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #6B7078; cursor: pointer; }
.cw-clip:hover { background: #F4F5F7; color: #25282D; }
.cw-clip svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cw-chip { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #6B7078; }
.cw-chip[hidden] { display: none; }
.cw-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-chip button { border: 0; background: none; color: #C2272D; font-size: 1.15rem; cursor: pointer; }
.cw-files { display: grid; gap: 6px; margin-top: 4px; }
.cw-files a { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 9px; border-radius: 10px; background: rgba(0, 0, 0, .05); color: inherit; text-decoration: none; font-size: .9rem; }
.cw-files a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-files svg, .cw-chip svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cw-files a:has(img) { padding: 0; background: none; }
.cw-files img { display: block; max-width: 220px; max-height: 200px; border-radius: 10px; object-fit: cover; }
.cw-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #FBC503; color: #25282D; cursor: pointer; display: grid; place-items: center; }
.cw-send:disabled { opacity: .6; }
.cw-send svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cw-err { margin: 0; color: #C2272D; font-size: .86rem; }
.cw-err.ok { color: #2F7A4B; }
.cw-err[hidden] { display: none; }
.cw-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px 12px; border-top: 1px solid #ECEDF0; font-size: .86rem; color: #6B7078; }
.cw-alt .cw-alt-t { width: 100%; }
.cw-alt a { display: inline-flex; align-items: center; gap: 6px; color: #25282D; text-decoration: none; font-weight: 500; }
.cw-alt a:hover { text-decoration: underline; }
.cw-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .5rem; font-weight: 700; }
.cw-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cw-ic.tg { background: #2AABEE; } .cw-ic.mx { background: #5B4FE9; } .cw-ic.ph { background: #2F9E5B; }
@media (max-width: 520px) { .cw.open { left: 12px; right: 12px; align-items: stretch; } .cw.open .cw-panel { width: auto; } .cw.open .cw-btn { align-self: flex-end; } }
