/* 优居窗帘 · 官网在线客服窗 */
.yjc-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #740A24;
  color: #fff;
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(116, 10, 36, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: transform .18s ease, box-shadow .18s ease;
}
.yjc-bubble:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(116, 10, 36, .34); }
.yjc-bubble svg { width: 26px; height: 26px; display: block; }
.yjc-bubble .yjc-dot {
  position: absolute; top: 10px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #C9A227; border: 2px solid #740A24;
}

.yjc-tip {
  position: fixed;
  right: 20px;
  bottom: 88px;
  max-width: 240px;
  background: #fff;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: 9997;
  cursor: pointer;
  animation: yjc-in .25s ease;
}
.yjc-tip::after {
  content: ""; position: absolute; right: 22px; bottom: -6px;
  width: 12px; height: 12px; background: #fff; transform: rotate(45deg);
  box-shadow: 2px 2px 4px rgba(0,0,0,.04);
}
.yjc-tip b { color: #740A24; }

.yjc-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 360px;
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  animation: yjc-in .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
@keyframes yjc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.yjc-head {
  background: #740A24;
  color: #fff;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.yjc-head .yjc-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.yjc-head .yjc-h-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.yjc-head .yjc-h-sub { font-size: 11px; opacity: .82; line-height: 1.4; margin-top: 2px; }
.yjc-close {
  margin-left: auto; background: transparent; border: 0; color: #fff;
  font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 6px;
  cursor: pointer; opacity: .85;
}
.yjc-close:hover { background: rgba(255, 255, 255, .14); opacity: 1; }

.yjc-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 12px 8px;
  background: #FAF8F8;
  -webkit-overflow-scrolling: touch;
}
.yjc-row { display: flex; margin-bottom: 10px; }
.yjc-row.me { justify-content: flex-end; }
.yjc-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.yjc-row.bot .yjc-msg { background: #fff; color: #2b2b2b; border: 1px solid #EEE6E8; border-bottom-left-radius: 4px; }
.yjc-row.me .yjc-msg { background: #740A24; color: #fff; border-bottom-right-radius: 4px; }

.yjc-typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.yjc-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: #C9B6BC;
  animation: yjc-blink 1.2s infinite ease-in-out;
}
.yjc-typing i:nth-child(2) { animation-delay: .18s; }
.yjc-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes yjc-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.yjc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 10px; background: #FAF8F8; flex: 0 0 auto; }
.yjc-chip {
  border: 1px solid #E7D7DC; background: #fff; color: #740A24;
  font-size: 12.5px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.yjc-chip:hover { background: #FBF3F5; border-color: #740A24; }

.yjc-foot { flex: 0 0 auto; border-top: 1px solid #F0E7E9; background: #fff; padding: 9px 10px 8px; }
.yjc-inputwrap { display: flex; align-items: flex-end; gap: 8px; }
.yjc-input {
  flex: 1 1 auto;
  border: 1px solid #E6DEE0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: none;
  max-height: 84px;
  outline: none;
  font-family: inherit;
  color: #2b2b2b;
  background: #fff;
}
.yjc-input:focus { border-color: #740A24; box-shadow: 0 0 0 2px rgba(116, 10, 36, .08); }
.yjc-send {
  flex: 0 0 auto;
  background: #740A24; color: #fff; border: 0;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; cursor: pointer;
}
.yjc-send:disabled { background: #D9C6CC; cursor: not-allowed; }
.yjc-note { font-size: 11px; color: #9a8f92; text-align: center; margin-top: 7px; line-height: 1.5; }
.yjc-note a { color: #740A24; text-decoration: none; }

@media (max-width: 560px) {
  .yjc-panel {
    right: 0; bottom: 0; left: 0;
    width: 100%; height: 78vh; max-height: 78vh;
    border-radius: 16px 16px 0 0;
  }
  .yjc-bubble { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .yjc-tip { right: 14px; bottom: 78px; max-width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .yjc-panel, .yjc-tip { animation: none; }
  .yjc-bubble { transition: none; }
}
