/* Live chat widget (public/shop/js/chat.js) */
.gch-btn { position: fixed; z-index: 85; right: 20px; bottom: 20px; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 12px 28px -10px rgba(255, 90, 31, .75), 0 2px 6px rgba(20, 21, 27, .18); transition: transform .15s, bottom .25s; }
.gch-btn:hover { transform: scale(1.06); }
.gch-btn svg { width: 26px; height: 26px; }
.gch-btn__dot { position: absolute; top: 2px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font: 800 11px/20px var(--body); text-align: center; border: 2px solid #fff; }
body:has(.pd__bar.show) .gch-btn { bottom: 92px; }
body.gch-on .gch-btn { display: none; }

.gch { position: fixed; z-index: 110; right: 20px; bottom: 20px; width: 370px; height: min(560px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--card); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(20, 21, 27, .45), 0 0 0 1px var(--line); font: 14px/1.5 var(--body); color: var(--ink); }
.gch[hidden] { display: none; }
.gch__hd { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; background: var(--ink); color: #fff; }
.gch__av { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; flex: none; }
.gch__av svg { width: 20px; height: 20px; }
.gch__hd b { display: block; font: 700 15px var(--display); }
.gch__hd small { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .7); font-size: 12px; }
.gch__hd small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.gch__x { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.gch__x:hover { background: rgba(255, 255, 255, .2); }
.gch__list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--paper); }
.gch__m { max-width: 82%; padding: 9px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.gch__m a { color: inherit; text-decoration: underline; }
.gch__m small { display: block; margin-top: 2px; font-size: 11px; opacity: .6; }
.gch__m--staff { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.gch__m--me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 5px; }
.gch__m--me small { text-align: right; }
.gch__sys { align-self: center; color: var(--mute); font-size: 12px; text-align: center; }
.gch__f { padding: 12px; border-top: 1px solid var(--line); background: var(--card); display: grid; gap: 8px; }
.gch__f input, .gch__f textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; color: inherit; background: #fff; }
.gch__f input:focus, .gch__f textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.gch__who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gch__who[hidden] { display: none; }
.gch__row { display: flex; gap: 8px; align-items: flex-end; }
.gch__row textarea { resize: none; height: 44px; max-height: 120px; }
.gch__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; }
.gch__send:disabled { opacity: .55; cursor: default; }
.gch__send svg { width: 20px; height: 20px; }
.gch__err { color: #c0392b; font-size: 12.5px; }
.gch__err:empty { display: none; }
.gch__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.gch .cfbox { display: flex; justify-content: center; }
.gch .cfbox:empty { display: none; }

@media (max-width: 560px) {
  .gch { inset: 0; width: auto; height: auto; border-radius: 0; }
  .gch-btn { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  body:has(.pd__bar.show) .gch-btn { bottom: 84px; }
  .gch__f input, .gch__f textarea { font-size: 16px; }
}
