/* Белый путь · клиентский чат. Дизайн «Документ»: IBM Plex, линии, без теней. */
#bp-chat-root{--bp-w:#FFFFFF;--bp-bg:#F4F5F7;--bp-ink:#1F2937;--bp-acc:#1D4ED8;--bp-line:#E2E5EA;
	--bp-t1:#1B2733;--bp-t2:#5B6672;--bp-ok:#4F7A63;--bp-wait:#8C7A45;--bp-warn:#A6604F;
	font-family:'IBM Plex Sans',-apple-system,'Segoe UI',Roboto,Arial,sans-serif;color:var(--bp-t1);
	position:fixed;right:24px;bottom:24px;z-index:99990;font-size:14px;line-height:1.45}
#bp-chat-root *{box-sizing:border-box;margin:0}
#bp-chat-root [hidden]{display:none !important}
#bp-chat-root button{font:inherit;cursor:pointer;border:none;background:none;color:inherit}
#bp-chat-root a{color:var(--bp-acc);text-decoration:none}

/* Кнопка вызова */
#bp-chat-root .bp-chat-fab{display:flex;align-items:center;gap:10px;background:var(--bp-ink);color:#fff;
	padding:14px 20px;border-radius:4px;letter-spacing:.02em}
#bp-chat-root .bp-chat-fab-hid{display:none}
#bp-chat-root .bp-chat-fab-badge{background:var(--bp-acc);color:#fff;border-radius:3px;padding:2px 8px;font-size:12px}
#bp-chat-root .bp-chat-fab-hint{position:absolute;right:0;bottom:100%;margin-bottom:8px;background:var(--bp-w);
	border:1px solid var(--bp-line);border-radius:4px;padding:8px 12px;font-size:12px;color:var(--bp-t2);white-space:nowrap}

/* Панель */
#bp-chat-root .bp-chat-panel{position:fixed;right:24px;bottom:24px;width:420px;height:min(700px,calc(100vh - 48px));
	background:var(--bp-w);border:1px solid var(--bp-line);border-radius:4px;display:flex;flex-direction:column;overflow:hidden}
#bp-chat-root .bp-chat-head{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--bp-line);background:var(--bp-w)}
#bp-chat-root .bp-chat-mark{display:inline-flex;gap:3px}
#bp-chat-root .bp-chat-mark i{width:8px;height:20px;background:var(--bp-ink);display:block}
#bp-chat-root .bp-chat-mark i+i{background:var(--bp-acc)}
#bp-chat-root .bp-chat-title{display:flex;flex-direction:column;line-height:1.2;min-width:0}
#bp-chat-root .bp-chat-title b{font-weight:600;letter-spacing:.06em;text-transform:uppercase;font-size:13px;white-space:nowrap}
#bp-chat-root .bp-chat-title em{font-style:normal;color:var(--bp-t2);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#bp-chat-root .bp-chat-menu{margin-left:auto;flex:none;color:var(--bp-acc);border:1px solid var(--bp-acc);
	border-radius:3px;padding:6px 12px;font-size:13px;line-height:1.2}
#bp-chat-root .bp-chat-menu:hover{background:var(--bp-acc);color:#fff}
#bp-chat-root .bp-chat-min{color:var(--bp-t2);font-size:18px;padding:4px 8px}
#bp-chat-root .bp-chat-pop{position:absolute;top:52px;right:12px;z-index:5;background:var(--bp-w);
	border:1px solid var(--bp-line);border-radius:4px;padding:6px 0;min-width:190px;display:flex;flex-direction:column}
#bp-chat-root .bp-chat-poplabel{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--bp-t2);padding:6px 14px 4px}
#bp-chat-root .bp-chat-popitem{display:block;padding:9px 14px;text-align:left;color:var(--bp-t1);font-size:14px;width:100%}
#bp-chat-root .bp-chat-popitem:hover{background:var(--bp-bg)}
#bp-chat-root .bp-chat-popsep{height:1px;background:var(--bp-line);margin:6px 0}
#bp-chat-root .bp-chat-popreset{color:var(--bp-warn)}
#bp-chat-root .bp-chat-body{flex:1;overflow-y:auto;background:var(--bp-bg);display:flex;flex-direction:column}

/* Главный экран */
#bp-chat-root .bp-chat-home{padding:24px 20px;display:flex;flex-direction:column;gap:12px}
#bp-chat-root .bp-chat-hello{font-size:20px;font-weight:600}
#bp-chat-root .bp-chat-sub{color:var(--bp-t2)}
#bp-chat-root .bp-chat-offline{background:#F6F3EA;border:1px solid #E4DCC4;border-left:3px solid var(--bp-wait);
	color:#6d6136;padding:10px 12px;border-radius:3px;font-size:13px}
#bp-chat-root .bp-chat-primary{background:var(--bp-acc);color:#fff;padding:13px 16px;border-radius:3px;font-weight:500;text-align:center}
#bp-chat-root .bp-chat-primary:disabled{background:#9DB2E8;cursor:default}
#bp-chat-root .bp-chat-secondary{background:var(--bp-w);border:1px solid var(--bp-line);padding:11px 14px;border-radius:3px;text-align:center;color:var(--bp-t1)}
#bp-chat-root .bp-chat-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
#bp-chat-root .bp-chat-resume{background:var(--bp-w);border:1px solid var(--bp-acc);color:var(--bp-acc);padding:11px 14px;border-radius:3px;text-align:left}
#bp-chat-root .bp-chat-msgrs{margin-top:8px;padding-top:14px;border-top:1px solid var(--bp-line);display:flex;flex-wrap:wrap;gap:8px;align-items:center}
#bp-chat-root .bp-chat-msgrs-label{width:100%;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--bp-t2)}
#bp-chat-root .bp-chat-msgr{border:1px solid var(--bp-line);background:var(--bp-w);border-radius:3px;padding:7px 12px;font-size:13px;color:var(--bp-t1)}

/* Шаги */
#bp-chat-root .bp-chat-step{padding:18px 20px;display:flex;flex-direction:column;gap:14px}
#bp-chat-root .bp-chat-stephead{display:flex;align-items:center;justify-content:space-between;gap:8px}
#bp-chat-root .bp-chat-back{color:var(--bp-t2);font-size:13px;padding:2px 0}
#bp-chat-root .bp-chat-progress{font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--bp-t2)}
#bp-chat-root .bp-chat-q{font-size:17px;font-weight:600}
#bp-chat-root .bp-chat-opts{display:flex;flex-direction:column;gap:8px}
#bp-chat-root .bp-chat-opts-inline{flex-direction:row}
#bp-chat-root .bp-chat-opt{background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:11px 14px;text-align:left;color:var(--bp-t1)}
#bp-chat-root .bp-chat-opt:hover{border-color:var(--bp-acc)}
#bp-chat-root .bp-chat-opt.is-sel{border-color:var(--bp-acc);color:var(--bp-acc)}
#bp-chat-root .bp-chat-opts-inline .bp-chat-opt{flex:1;text-align:center;font-family:'IBM Plex Mono',monospace}
#bp-chat-root .bp-chat-inputrow{display:flex;gap:8px;align-items:center}
#bp-chat-root .bp-chat-unit{color:var(--bp-t2);font-family:'IBM Plex Mono',monospace;font-size:13px;flex:none}
#bp-chat-root .bp-chat-input{flex:1;background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:11px 12px;font:inherit;color:var(--bp-t1);width:100%}
#bp-chat-root .bp-chat-input:focus{outline:none;border-color:var(--bp-acc)}
#bp-chat-root .bp-chat-go{background:var(--bp-ink);color:#fff;border-radius:3px;padding:0 16px}
#bp-chat-root .bp-chat-skip{color:var(--bp-t2);text-align:center;padding:6px;text-decoration:underline;text-underline-offset:3px}
#bp-chat-root .bp-chat-hp{position:absolute;left:-9999px;top:-9999px}
#bp-chat-root .bp-chat-form{display:flex;flex-direction:column;gap:10px}
#bp-chat-root .bp-chat-note{font-size:12px;color:var(--bp-t2)}
#bp-chat-root .bp-chat-note-c{text-align:center}
#bp-chat-root .bp-chat-consent{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--bp-t2);cursor:pointer}
#bp-chat-root .bp-chat-consent input{margin-top:2px}
#bp-chat-root .bp-chat-err{background:#F7EEEB;border:1px solid #E5CFC7;border-left:3px solid var(--bp-warn);color:#7c4436;
	padding:9px 12px;border-radius:3px;font-size:13px}

/* Карточка заявки */
#bp-chat-root .bp-chat-shipcard{background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:14px;display:flex;flex-direction:column;gap:6px;margin:0 0 4px}
#bp-chat-root .bp-chat-shipnum{display:flex;align-items:center;gap:8px}
#bp-chat-root .bp-chat-shipnum b{font-family:'IBM Plex Mono',monospace;letter-spacing:.04em}
#bp-chat-root .bp-chat-dot{width:8px;height:8px;border-radius:50%;background:var(--bp-acc);display:inline-block}
#bp-chat-root .bp-chat-dot-new{background:var(--bp-acc)}
#bp-chat-root .bp-chat-dot-calc,#bp-chat-root .bp-chat-dot-docs{background:var(--bp-wait)}
#bp-chat-root .bp-chat-dot-offer,#bp-chat-root .bp-chat-dot-talks{background:var(--bp-ok)}
#bp-chat-root .bp-chat-dot-closed{background:var(--bp-t2)}
#bp-chat-root .bp-chat-shipstatus{font-size:12px;color:var(--bp-t2)}
#bp-chat-root .bp-chat-shiproute{font-family:'IBM Plex Mono',monospace;font-size:12px;letter-spacing:.06em;color:var(--bp-t1)}
#bp-chat-root .bp-chat-shipline{font-size:13px;color:var(--bp-t2)}
#bp-chat-root .bp-chat-stages{margin-top:6px;border-top:1px solid var(--bp-line);padding-top:8px;display:flex;flex-direction:column;gap:6px}
#bp-chat-root .bp-chat-stage{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--bp-t2)}
#bp-chat-root .bp-chat-stage i{width:8px;height:8px;border-radius:50%;border:1px solid var(--bp-line);display:inline-block;flex:none}
#bp-chat-root .bp-chat-stage.is-done{color:var(--bp-t1)}
#bp-chat-root .bp-chat-stage.is-done i{background:var(--bp-ok);border-color:var(--bp-ok)}
#bp-chat-root .bp-chat-stage.is-current{color:var(--bp-t1);font-weight:500}
#bp-chat-root .bp-chat-stage.is-current i{background:var(--bp-acc);border-color:var(--bp-acc)}

/* Переписка */
#bp-chat-root .bp-chat-chat{flex:1;display:flex;flex-direction:column;min-height:0}
#bp-chat-root .bp-chat-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px}
#bp-chat-root .bp-chat-sysline{align-self:center;font-size:12px;color:var(--bp-t2);background:var(--bp-w);
	border:1px solid var(--bp-line);border-radius:3px;padding:5px 12px;text-align:center}
#bp-chat-root .bp-chat-invite{background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:14px;display:flex;flex-direction:column;gap:10px}
#bp-chat-root .bp-chat-msg{max-width:85%;display:flex;flex-direction:column;gap:3px}
#bp-chat-root .bp-chat-msg.is-me{align-self:flex-end;align-items:flex-end}
#bp-chat-root .bp-chat-msg.is-them{align-self:flex-start}
#bp-chat-root .bp-chat-msgwho{display:flex;align-items:center;gap:6px;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--bp-t2)}
#bp-chat-root .bp-chat-ava{width:22px;height:22px;background:var(--bp-ink);color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:10px;border-radius:3px}
#bp-chat-root .bp-chat-bubble{background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:9px 12px;white-space:pre-wrap;word-break:break-word}
#bp-chat-root .bp-chat-msg.is-me .bp-chat-bubble{background:var(--bp-acc);border-color:var(--bp-acc);color:#fff}
#bp-chat-root .bp-chat-bubble.is-offer{border-left:3px solid var(--bp-ok)}
#bp-chat-root .bp-chat-msgmeta{font-size:11px;color:var(--bp-t2);font-family:'IBM Plex Mono',monospace}
#bp-chat-root .bp-chat-fmsg{display:flex;flex-direction:column;gap:2px;color:inherit}
#bp-chat-root .bp-chat-fmsg b{font-weight:500;text-decoration:underline;text-underline-offset:3px}
#bp-chat-root .bp-chat-fmsg span{font-size:12px;opacity:.75}
#bp-chat-root .bp-chat-composer{display:flex;align-items:flex-end;gap:8px;border-top:1px solid var(--bp-line);background:var(--bp-w);padding:10px 12px}
#bp-chat-root .bp-chat-attach{cursor:pointer;padding:8px;color:var(--bp-t2)}
#bp-chat-root .bp-chat-ta{flex:1;border:1px solid var(--bp-line);border-radius:3px;padding:9px 12px;font:inherit;resize:none;max-height:110px;color:var(--bp-t1);background:var(--bp-w)}
#bp-chat-root .bp-chat-ta:focus{outline:none;border-color:var(--bp-acc)}
#bp-chat-root .bp-chat-sendbtn{background:var(--bp-acc);color:#fff;border-radius:3px;width:38px;height:38px;font-size:16px}

/* Файловая зона */
#bp-chat-root .bp-chat-filezone{display:flex;flex-direction:column;gap:10px}
#bp-chat-root .bp-chat-drop{border:1px dashed var(--bp-line);border-radius:3px;background:var(--bp-w);padding:20px;
	display:flex;flex-direction:column;gap:4px;align-items:center;text-align:center;color:var(--bp-t2)}
#bp-chat-root .bp-chat-drop b{color:var(--bp-t1);font-weight:500}
#bp-chat-root .bp-chat-drop.is-over{border-color:var(--bp-acc)}
#bp-chat-root .bp-chat-filebtn{cursor:pointer}
#bp-chat-root .bp-chat-filelist{display:flex;flex-direction:column;gap:6px}
#bp-chat-root .bp-chat-filecard{background:var(--bp-w);border:1px solid var(--bp-line);border-radius:3px;padding:9px 12px;display:flex;flex-direction:column;gap:2px}
#bp-chat-root .bp-chat-filename{font-weight:500;word-break:break-all}
#bp-chat-root .bp-chat-filemeta{font-size:12px;color:var(--bp-t2)}

/* Мобильный */
@media (max-width:640px){
	#bp-chat-root{right:16px;bottom:16px}
	#bp-chat-root .bp-chat-fab-hint{display:none}
	#bp-chat-root .bp-chat-panel{right:0;bottom:0;left:0;top:0;width:auto;height:100%;border:none;border-radius:0}
	body.bp-chat-lock{overflow:hidden}
}
