/* 京小师对话框：首页浮层 / 手机抽屉 */

button.float-cta{
  font-family:inherit;
  cursor:pointer;
  border:0;
  appearance:none;
}

.mobile-bar #jsbrChatOpenMobile{
  flex:1;
  text-align:center;
  padding:11px;
  border-radius:22px;
  font-size:15px;
  font-weight:600;
  background:var(--orange);
  color:#fff;
  border:0;
  cursor:pointer;
  font-family:inherit;
}

.jsbr-chat{
  position:fixed;
  right:14px;
  bottom:210px;
  z-index:120;
  width:380px;
  max-width:calc(100vw - 28px);
  max-height:min(640px, calc(100vh - 230px));
  display:none;
  flex-direction:column;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 16px 40px rgba(29,33,41,.18);
  overflow:hidden;
}

.jsbr-chat.is-open{display:flex}
.jsbr-chat.is-min{max-height:none}

.jsbr-chat-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 12px 12px 14px;
  background:var(--blue-grad);
  color:#fff;
  flex:none;
}

.jsbr-chat-avatar{
  width:36px;
  height:36px;
  border-radius:50%;
  background:rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  font-weight:800;
  flex:none;
}

.jsbr-chat-who{flex:1;min-width:0}
.jsbr-chat-who h3{font-size:16px;font-weight:800;line-height:1.2;margin:0}
.jsbr-chat-who p{margin:3px 0 0;font-size:12px;opacity:.9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.jsbr-chat-tools{display:flex;gap:4px;flex:none}
.jsbr-chat-tools button{
  width:28px;
  height:28px;
  border:0;
  border-radius:8px;
  background:rgba(255,255,255,.16);
  color:#fff;
  font-size:16px;
  line-height:1;
  cursor:pointer;
}
.jsbr-chat-tools button:hover{background:rgba(255,255,255,.28)}

.jsbr-chat-body{
  display:flex;
  flex-direction:column;
  min-height:0;
  flex:1;
}
.jsbr-chat.is-min .jsbr-chat-body{display:none}

.jsbr-chat-msgs{
  flex:1;
  overflow:auto;
  padding:14px 14px 6px;
  background:var(--bg);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.jsbr-chat-bubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:12px;
  font-size:14px;
  line-height:1.65;
  word-break:break-word;
  white-space:pre-wrap;
}
.jsbr-chat-bubble.is-assistant{
  align-self:flex-start;
  background:#eef4ff;
  color:var(--ink);
  border:1px solid #d7e4ff;
}
.jsbr-chat-bubble.is-assistant p{
  margin:0 0 8px;
}
.jsbr-chat-bubble.is-assistant p:last-child{margin-bottom:0}
.jsbr-chat-spec{
  margin:0 0 8px;
  padding:8px 10px;
  background:#fff;
  border:1px solid #d7e4ff;
  border-radius:10px;
}
.jsbr-chat-spec:last-child{margin-bottom:0}
.jsbr-chat-spec-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding:4px 0;
}
.jsbr-chat-spec-row + .jsbr-chat-spec-row{border-top:1px dashed #e8eef9}
.jsbr-chat-spec-row.is-desc{
  display:block;
  color:var(--ink-2);
  font-size:12.5px;
  line-height:1.55;
  padding-top:2px;
  border-top:0;
}
.jsbr-chat-spec-name{font-weight:700;color:var(--ink)}
.jsbr-chat-spec-price{font-weight:700;color:var(--blue);flex:none}
.jsbr-chat-bubble.is-user{
  align-self:flex-end;
  background:var(--blue);
  color:#fff;
}
.jsbr-chat-bubble.is-system{
  align-self:stretch;
  max-width:100%;
  background:#fff;
  border:1px solid var(--line);
  color:var(--ink-2);
}

.jsbr-chat-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:2px}
.jsbr-chat-chip{
  border:1px solid #d7e4ff;
  background:#fff;
  color:var(--blue);
  border-radius:20px;
  padding:5px 12px;
  font-size:12.5px;
  cursor:pointer;
  font-family:inherit;
}
.jsbr-chat-chip:hover{background:#f0f5ff}

.jsbr-chat-handoff p{margin:0 0 10px;font-size:13.5px;color:var(--ink-2)}
.jsbr-chat-handoff .acts{display:flex;flex-wrap:wrap;gap:8px}
.jsbr-chat-handoff .acts button{
  border:0;
  border-radius:20px;
  padding:7px 14px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
}
.jsbr-chat-yes{background:var(--orange);color:#fff}
.jsbr-chat-no{background:#f2f3f5;color:var(--ink-2)}

.jsbr-chat-typing{
  align-self:flex-start;
  color:var(--ink-3);
  font-size:13px;
  padding:2px 4px;
}

.jsbr-chat-composer{
  display:flex;
  gap:8px;
  padding:10px 12px 12px;
  border-top:1px solid var(--line);
  background:#fff;
  flex:none;
}
.jsbr-chat-composer textarea{
  flex:1;
  min-height:40px;
  max-height:96px;
  resize:none;
  border:1px solid var(--line);
  border-radius:10px;
  padding:8px 10px;
  font-size:14px;
  font-family:inherit;
  color:var(--ink);
  line-height:1.5;
}
.jsbr-chat-composer textarea:focus{outline:none;border-color:#9bb7ff}
.jsbr-chat-composer button{
  align-self:flex-end;
  border:0;
  border-radius:20px;
  padding:9px 16px;
  background:var(--blue-grad);
  color:#fff;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
}
.jsbr-chat-composer button:disabled{
  opacity:.5;
  cursor:not-allowed;
}

@media(max-width:900px){
  button.float-cta{display:none}
  .jsbr-chat{
    right:12px;
    left:12px;
    bottom:72px;
    width:auto;
    max-width:none;
    max-height:calc(100vh - 150px);
  }
}
