/* Чат-помощник procupon.ru («Вика»). Источник: /root/procupon-frontend/pcchat/pcchat.css
   Выкладывать вместе с procupon-chat.php; версия в адресе — filemtime.
   Палитра из темы: оранжевый градиент кнопки купона (style.css:5787),
   тёмный #1f2734 из заголовков, серые #e9e9e9/#f5f5f5/#999. */

.pcchat{
	--pc-accent:#f45f2b;--pc-accent-2:#ff7f43;--pc-dark:#1f2734;--pc-ink:#2d3538;
	--pc-line:#ececec;--pc-soft:#fff3ed;
	border:1px solid var(--pc-line);border-radius:18px;background:#fff;margin:0 0 28px;
	overflow:hidden;font-size:15px;line-height:1.5;color:var(--pc-ink);
	box-shadow:0 1px 2px rgba(31,39,52,.04)
}

/* --- шапка --- */
.pcchat__head{display:flex;gap:12px;align-items:center;padding:15px 18px;background:var(--pc-dark);color:#fff}
.pcchat__ava{width:38px;height:38px;border-radius:50%;flex:0 0 auto;overflow:hidden;
	background:linear-gradient(135deg,var(--pc-accent-2) 0%,var(--pc-accent) 100%);
	color:#fff;font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:center;
	box-shadow:0 0 0 3px rgba(255,255,255,.12)}
.pcchat__ava img{width:100%;height:100%;object-fit:cover;display:block}
.pcchat__title{display:block;font-size:16px;line-height:1.25;font-weight:700;letter-spacing:.01em}
.pcchat__sub{display:block;font-size:12px;opacity:.62;margin-top:1px}
.pcchat__close{margin-left:auto;border:0;background:rgba(255,255,255,.08);color:#fff;width:30px;height:30px;
	border-radius:50%;font-size:18px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;
	transition:background .15s}
.pcchat__close:hover{background:rgba(255,255,255,.2)}

/* --- переписка --- */
.pcchat__log{padding:18px;min-height:250px;max-height:340px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;
	background:#fafafa;scrollbar-width:thin}
.pcchat__log::-webkit-scrollbar{width:6px}
.pcchat__log::-webkit-scrollbar-thumb{background:#dcdcdc;border-radius:3px}
.pcchat__day{align-self:center;font-size:12px;color:#a2a6aa;padding:2px 0 4px}
.pcchat__row{display:flex;gap:8px;align-items:flex-end;max-width:100%;animation:pcchat-in .18s ease-out}
.pcchat__row--bot{align-self:flex-start;max-width:92%}
.pcchat__row--me{align-self:flex-end;max-width:88%;justify-content:flex-end}
.pcchat__mini{width:26px;height:26px;border-radius:50%;flex:0 0 auto;margin-bottom:18px;
	background:linear-gradient(135deg,var(--pc-accent-2) 0%,var(--pc-accent) 100%);color:#fff;
	font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.pcchat__col{min-width:0}
.pcchat__meta{font-size:11px;color:#a2a6aa;margin:4px 2px 0}
.pcchat__row--me .pcchat__meta{text-align:right}
.pcchat__msg{padding:11px 14px;white-space:pre-wrap;word-wrap:break-word}
.pcchat__msg--bot{background:#fff;border:1px solid var(--pc-line);
	border-radius:16px 16px 16px 5px;box-shadow:0 1px 2px rgba(31,39,52,.05)}
.pcchat__msg--me{background:linear-gradient(135deg,var(--pc-accent-2) 0%,var(--pc-accent) 100%);color:#fff;
	border-radius:16px 16px 5px 16px;box-shadow:0 2px 8px rgba(244,95,43,.25)}
.pcchat__msg--wait{color:#9a9a9a;box-shadow:none;background:#f1f1f1;border-color:transparent}
@keyframes pcchat-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

/* --- кнопки-подсказки --- */
.pcchat__chips{display:flex;flex-wrap:wrap;gap:8px;padding:16px 18px 2px}
.pcchat__chip{
	border:1px solid var(--pc-line);background:var(--pc-soft);color:#c8481a;
	border-radius:12px;padding:9px 14px;font:inherit;font-size:13.5px;font-weight:500;line-height:1.25;
	cursor:pointer;transition:background .15s,border-color .15s,color .15s,transform .08s;
	white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis
}
.pcchat__chip:hover{background:linear-gradient(135deg,var(--pc-accent-2) 0%,var(--pc-accent) 100%);
	color:#fff;border-color:transparent}
.pcchat__chip:active{transform:translateY(1px)}
.pcchat__chip[data-free]{background:#fff;color:#8a8f94;border-style:dashed}
.pcchat__chip[data-free]:hover{background:#fff;color:var(--pc-accent);border-color:var(--pc-accent);border-style:solid}

/* --- строка ввода --- */
.pcchat__form{display:flex;gap:9px;padding:14px 18px 6px;align-items:center}
.pcchat__input{flex:1 1 auto;border:1px solid var(--pc-line);border-radius:999px;padding:12px 16px;
	font:inherit;font-size:14.5px;min-width:0;color:var(--pc-ink);background:#fff;transition:border-color .15s,box-shadow .15s}
.pcchat__input::placeholder{color:#a9adb1}
.pcchat__input:focus{outline:0;border-color:var(--pc-accent);box-shadow:0 0 0 3px rgba(244,95,43,.12)}
.pcchat__send{flex:0 0 auto;width:44px;height:44px;border:0;border-radius:50%;
	background:linear-gradient(135deg,var(--pc-accent-2) 0%,var(--pc-accent) 100%);color:#fff;
	font-size:17px;cursor:pointer;display:flex;align-items:center;justify-content:center;
	box-shadow:0 3px 10px rgba(244,95,43,.3);transition:transform .08s,box-shadow .15s}
.pcchat__send:hover{box-shadow:0 5px 14px rgba(244,95,43,.4)}
.pcchat__send:active{transform:translateY(1px)}
.pcchat__send[disabled]{opacity:.45;box-shadow:none;cursor:default}

/* --- приветственный экран (пока в переписке пусто) --- */
.pcchat__welcome{margin:auto;padding:6px 10px 10px;text-align:center}
.pcchat__art{width:150px;height:112px;display:block;margin:0 auto 14px}
.pcchat__wtitle{margin:0 0 8px;font-size:20px;line-height:1.25;font-weight:800;color:var(--pc-dark)}
.pcchat__wtext{margin:0;font-size:14px;line-height:1.5;color:#8d9196;max-width:19em;margin-inline:auto}

/* --- плавающий режим --- */
.pcchat-float{position:fixed;right:20px;bottom:20px;z-index:99998;transition:bottom .2s}
.pcchat-float .pcchat{margin:0;box-shadow:0 18px 50px rgba(31,39,52,.28)}
.pcchat-launch{display:flex;align-items:center;justify-content:center;width:58px;height:58px;
	border:0;border-radius:50%;margin-left:auto;
	background:linear-gradient(135deg,var(--pc-accent-2,#ff7f43) 0%,var(--pc-accent,#f45f2b) 100%);
	color:#fff;cursor:pointer;
	box-shadow:0 8px 22px rgba(244,95,43,.38);transition:transform .12s,box-shadow .15s}
.pcchat-launch:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(244,95,43,.48)}
.pcchat-launch:active{transform:translateY(0)}
.pcchat-launch__ico{width:27px;height:27px;display:block}
.pcchat-panel{width:376px;max-width:calc(100vw - 40px);animation:pcchat-pop .18s ease-out}
@keyframes pcchat-pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.pcchat-float.is-open .pcchat-launch{display:none}

@media(max-width:600px){
	.pcchat__msg{max-width:94%}
	.pcchat__log{min-height:210px;max-height:44vh}
	.pcchat__art{width:124px;height:93px}
	.pcchat__wtitle{font-size:18px}
	.pcchat__chips{padding:13px 14px 2px}
	.pcchat__chip{font-size:13px;padding:8px 12px}
	.pcchat__head,.pcchat__form{padding-left:14px;padding-right:14px}
	.pcchat__log{padding:14px}
	.pcchat-float{right:12px;bottom:12px;left:12px;display:flex;justify-content:flex-end}
	.pcchat-panel{width:100%;max-width:none}
	.pcchat{border-radius:16px}
}
@media(prefers-reduced-motion:reduce){
	.pcchat__msg,.pcchat-panel{animation:none}
	.pcchat-launch:hover{transform:none}
}
