/* Kofemarket: чат-бот. Над нижней панелью темы InSale (54 px на ПК, 46 px на телефоне, z-index 900); меню темы — 999. */
.kofekp-chat { --kc-accent: #807070; --kc-accent-dark: #5c4f4f; font-size: 14px; line-height: 1.45; }
.kofekp-chat__launch {
  position: fixed; right: 16px; bottom: 70px; z-index: 950; display: flex; align-items: center; gap: 8px;
  padding: 12px 18px; border: 0; border-radius: 28px; background: var(--kc-accent); color: #fff; font: inherit; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); cursor: pointer; transition: background .15s, transform .15s;
}
.kofekp-chat__launch:hover { background: var(--kc-accent-dark); transform: translateY(-1px); }
/* круглая кнопка: не закрывает «Запросить КП» и «В корзину» в правой колонке карточки; подпись — при наведении */
.kofekp-chat__launch { width: 56px; height: 56px; padding: 0; justify-content: center; border-radius: 50%; }
.kofekp-chat__launch svg { width: 26px; height: 26px; }
.kofekp-chat__launch span { position: absolute; right: 64px; white-space: nowrap; padding: 6px 10px; border-radius: 6px;
  background: #333; color: #fff; font-size: 13px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .15s; }
.kofekp-chat__launch:hover span, .kofekp-chat__launch:focus-visible span { opacity: 1; }
.kofekp-chat_open .kofekp-chat__launch { display: none; }
.kofekp-chat__panel {
  position: fixed; right: 16px; bottom: 70px; z-index: 960; display: flex; flex-direction: column; width: 380px; height: min(600px, calc(100vh - 150px));
  border-radius: 12px; background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); overflow: hidden;
}
.kofekp-chat__panel[hidden] { display: none; }
.kofekp-chat__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--kc-accent); color: #fff; }
.kofekp-chat__head b { display: block; font-size: 15px; }
.kofekp-chat__head small { opacity: .85; font-size: 12px; }
.kofekp-chat__head > div { flex: 1; min-width: 0; }
.kofekp-chat__tg { display: flex; align-items: center; gap: 5px; margin-right: 8px; padding: 5px 10px; border-radius: 14px;
  background: #fff; color: #229ed9 !important; font-size: 12px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.kofekp-chat__tg:hover { background: #eaf6fc; }
.kofekp-chat__max { margin-right: 6px; color: #fff !important; background: linear-gradient(135deg, #3a8bff, #8a3cff); }
.kofekp-chat__max:hover { background: linear-gradient(135deg, #2f78e6, #7530e0); }
@media (max-width: 400px) { .kofekp-chat__tg { padding: 5px 8px; } .kofekp-chat__tg svg { display: none; } }
.kofekp-chat__close { border: 0; background: none; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }
.kofekp-chat__log { flex: 1; overflow-y: auto; padding: 14px; background: #faf8f7; display: flex; flex-direction: column; gap: 8px; }
.kofekp-chat__msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; overflow-wrap: anywhere; }
.kofekp-chat__msg_bot { align-self: flex-start; background: #fff; border: 1px solid #ece7e6; color: #222; border-bottom-left-radius: 4px; }
.kofekp-chat__msg_user { align-self: flex-end; background: var(--kc-accent); color: #fff; border-bottom-right-radius: 4px; }
.kofekp-chat__msg a { color: #0563c1; }
.kofekp-chat__typing { color: #888; font-size: 13px; }
.kofekp-chat__typing span { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #bbb; animation: kofekp-dot 1s infinite; }
.kofekp-chat__typing span:nth-child(2) { animation-delay: .2s; }
.kofekp-chat__typing span:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes kofekp-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.kofekp-chat__cards { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.kofekp-chat__card { flex: 0 0 140px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid #ece7e6; border-radius: 10px;
  background: #fff; color: #222 !important; text-decoration: none !important; }
.kofekp-chat__card img { width: 100%; height: 90px; object-fit: contain; }
.kofekp-chat__card-name { font-size: 12px; line-height: 1.3; max-height: 3.9em; overflow: hidden; }
.kofekp-chat__card-price { font-weight: 700; font-size: 13px; }
.kofekp-chat__quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; background: #faf8f7; }
.kofekp-chat__quick:not(:empty) { padding-bottom: 10px; }
.kofekp-chat__quick button { padding: 6px 10px; border: 1px solid var(--kc-accent); border-radius: 16px; background: #fff; color: var(--kc-accent-dark);
  font: inherit; font-size: 13px; cursor: pointer; }
.kofekp-chat__quick button:hover { background: var(--kc-accent); color: #fff; }
.kofekp-chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid #eee; }
.kofekp-chat__form textarea { flex: 1; resize: none; max-height: 120px; padding: 9px 10px; border: 1px solid #d6d0d0; border-radius: 8px;
  font: inherit; font-size: 15px; box-sizing: border-box; }
.kofekp-chat__form textarea:focus { outline: none; border-color: var(--kc-accent); }
.kofekp-chat__form button { flex: 0 0 40px; height: 40px; border: 0; border-radius: 50%; background: var(--kc-accent); color: #fff; cursor: pointer; }
.kofekp-chat__legal { padding: 0 12px 10px; font-size: 11px; line-height: 1.35; color: #888; }
.kofekp-chat__legal a { color: #888; text-decoration: underline; }

@media (max-width: 767px) {
  .kofekp-chat__launch { bottom: 58px; right: 12px; width: 52px; height: 52px; }
  .kofekp-chat__launch span { display: none; }
  .kofekp-chat__panel { inset: 0; width: auto; height: auto; border-radius: 0; z-index: 1001; }
  .kofekp-chat__form textarea { font-size: 16px; } /* без авто-зума в iOS */
}
