/* GS SDR 官网智能接待组件样式 */

.gs-sdr-bubble {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999998;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, #00ADEF, #0089c4);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 173, 239, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gs-sdr-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 173, 239, 0.45);
}

.gs-sdr-bubble-txt {
  white-space: nowrap;
}

.gs-sdr-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  font-family: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  animation: gsSdrIn 0.2s ease;
}

@keyframes gsSdrIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gs-sdr-hidden {
  display: none !important;
}

/* 头部 */
.gs-sdr-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 16px;
  background: linear-gradient(135deg, #00ADEF, #0089c4);
  color: #fff;
  flex-shrink: 0;
}

.gs-sdr-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.gs-sdr-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 3px;
  line-height: 1.4;
}

.gs-sdr-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.85;
}

.gs-sdr-close:hover {
  opacity: 1;
}

/* 消息区 */
.gs-sdr-list {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f7f9fb;
}

.gs-sdr-msg {
  display: flex;
  margin-bottom: 10px;
}

.gs-sdr-ai {
  justify-content: flex-start;
}

.gs-sdr-visitor {
  justify-content: flex-end;
}

.gs-sdr-bubblemsg {
  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;
}

.gs-sdr-ai .gs-sdr-bubblemsg {
  background: #fff;
  color: #1f2937;
  border: 1px solid #e8edf2;
  border-bottom-left-radius: 4px;
}

.gs-sdr-visitor .gs-sdr-bubblemsg {
  background: #00ADEF;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* 输入中动画 */
.gs-sdr-typing .gs-sdr-bubblemsg {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px;
}

.gs-sdr-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: gsSdrDot 1.2s infinite ease-in-out;
}

.gs-sdr-dot:nth-child(2) { animation-delay: 0.15s; }
.gs-sdr-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes gsSdrDot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* 输入区 */
.gs-sdr-inputrow {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #eef2f6;
  flex-shrink: 0;
}

.gs-sdr-input {
  flex: 1;
  border: 1px solid #dde5ec;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}

.gs-sdr-input:focus {
  border-color: #00ADEF;
  box-shadow: 0 0 0 2px rgba(0, 173, 239, 0.12);
}

.gs-sdr-send {
  background: #00ADEF;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.gs-sdr-send:hover {
  background: #0098d4;
}

/* 联系方式表单 */
.gs-sdr-contact {
  margin-top: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 10px;
}

.gs-sdr-contact-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 6px;
}

.gs-sdr-contact-desc {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 10px;
}

.gs-sdr-contact-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dde5ec;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  margin-bottom: 8px;
  font-family: inherit;
}

.gs-sdr-contact-input:focus {
  border-color: #00ADEF;
}

.gs-sdr-contact-btn {
  width: 100%;
  background: #00ADEF;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.gs-sdr-contact-btn:hover {
  background: #0098d4;
}

.gs-sdr-contact-done {
  color: #10b981;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  padding: 6px 0;
}

/* 移动端 */
@media (max-width: 480px) {
  .gs-sdr-panel {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: calc(100vh - 80px);
    max-height: none;
    border-radius: 12px;
  }
  .gs-sdr-bubble {
    right: 12px;
    bottom: 12px;
    padding: 11px 15px;
    font-size: 13px;
  }
  .gs-sdr-bubble-txt {
    display: none;
  }
  .gs-sdr-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    justify-content: center;
    padding: 0;
  }
}
