/* 官网客服浮窗。颜色、圆角、阴影、字体全部取 site.css 的变量,不另起一套
   (site.css 必须先加载)。深色页脚区域不影响它:浮窗固定在视口右下角。 */

.sc-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: 26px;
  background: var(--red);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(199, 0, 11, 0.28);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}
.sc-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(199, 0, 11, 0.34); }
.sc-launcher svg { width: 20px; height: 20px; flex: none; }
.sc-launcher[hidden] { display: none; }

.sc-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 901;
  display: flex;
  flex-direction: column;
  width: 380px;
  height: min(580px, calc(100vh - 48px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-frame);
  font-family: var(--font);
  overflow: hidden;
  /* 打开动画跟 site.css 的 reveal 用同一条曲线。 */
  transform-origin: 100% 100%;
  animation: sc-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.sc-panel[hidden] { display: none; }

@keyframes sc-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-panel { animation: none; }
  .sc-launcher { transition: none; }
}

.sc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.sc-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.sc-head-spacer { flex: 1; }

.sc-btn {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.sc-btn:hover { background: var(--paper); }
.sc-btn[disabled] { color: var(--ink-4); cursor: default; background: var(--paper); }

.sc-close {
  width: 28px;
  height: 28px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.sc-close:hover { background: var(--paper); color: var(--ink); }

.sc-body { flex: 1; min-height: 0; display: flex; }
.sc-body deep-chat { width: 100%; height: 100%; }

/* 加载 bundle 期间的占位,和转人工后的状态条共用样式。 */
.sc-note {
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
}
.sc-note a { color: var(--red); text-decoration: underline; }

.sc-foot {
  padding: 8px 18px 12px;
  font-size: 11px;
  color: var(--ink-4);
  border-top: 1px solid var(--line-soft);
}

/* 手机上铺满,右下角小窗在 375px 宽的屏上没法用。 */
@media (max-width: 600px) {
  .sc-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
  }
  .sc-launcher { right: 16px; bottom: 16px; }
}
