/* ===== 左下角微信在线咨询 ===== */

@keyframes wxsHintIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes wxsPing {
  0% { transform: scale(1); opacity: .7; }
  75%, 100% { transform: scale(2); opacity: 0; }
}
@keyframes korisdaModalIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.wxs-entry {
  position: fixed;
  left: 16px;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 12px;
}
.wxs-entry-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 20px 0 16px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  background: linear-gradient(90deg, #07c160, #06b6d4);
  box-shadow: 0 8px 28px -6px rgba(16, 185, 129, .6), inset 0 0 0 1px rgba(255, 255, 255, .25);
  transition: filter .2s ease, transform .1s ease;
}
.wxs-entry-btn:hover { filter: brightness(1.05); }
.wxs-entry-btn:active { transform: scale(.95); }
.wxs-entry-btn .wxs-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
}
.wxs-entry-btn .wxs-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ff5b4d;
  animation: wxsPing 1.2s cubic-bezier(0, 0, .2, 1) infinite;
}
.wxs-entry-btn .wxs-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #ff5b4d;
  border: 2px solid #fff;
}
.wxs-hint {
  position: relative;
  max-width: 190px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(16, 185, 129, .2);
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1);
  font-size: 12px;
  line-height: 1.4;
  color: #3d524d;
  animation: wxsHintIn .4s ease-out;
}
.wxs-hint::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  background: #fff;
  border-left: 1px solid rgba(16, 185, 129, .2);
  border-bottom: 1px solid rgba(16, 185, 129, .2);
  transform: rotate(45deg);
}

@media (min-width: 640px) {
  .wxs-entry { left: 24px; bottom: 24px; }
}
/* 移动端隐藏提示气泡 */
@media (max-width: 639px) {
  .wxs-hint { display: none; }
}

/* ===== 客服咨询弹窗 ===== */
.korisda-chat-modal,
.korisda-chat-modal * {
  box-sizing: border-box;
}

.korisda-chat-modal {
  --korisda-green: #08bd79;
  --korisda-teal: #08b7c5;
  --korisda-text: #244c48;
  --korisda-muted: #829693;
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 99999;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  color: var(--korisda-text);
  border-radius: 19px;
  box-shadow: 0 30px 90px -10px rgba(9, 53, 46, .45), 0 12px 32px rgba(9, 53, 46, .18);
  animation: korisdaModalIn .3s ease-out;
}

.korisda-chat-modal[hidden] {
  display: none !important;
}

.korisda-chat-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9f0e9;
  border-radius: 19px;
}

/* 顶部 */
.korisda-chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 19px 17px;
  background: linear-gradient(120deg, #e8faf4, #f4fbfa);
  border-bottom: 1px solid #dcefe9;
}

.korisda-brand-icon {
  display: flex;
  flex: 0 0 43px;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  color: white;
  background: linear-gradient(135deg, #08c77b, #08b8bd);
  border-radius: 50%;
}

.korisda-brand-icon svg {
  width: 30px;
  height: 30px;
}

.korisda-brand-text {
  flex: 1;
  min-width: 0;
}

.korisda-brand-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .2px;
}

.korisda-brand-subtitle {
  margin-top: 5px;
  color: #829793;
  font-size: 12px;
}

.korisda-close {
  display: flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #66817c;
  line-height: 1;
  background: #e0efeb;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.korisda-close:hover {
  background: #d3e7e1;
}

/* 主体 */
.korisda-chat-body {
  padding: 18px 17px 20px;
}

.korisda-intro {
  margin: 0 0 16px;
  color: #7b8e8a;
  font-size: 13px;
  line-height: 1.85;
}

/* 二维码左右分栏 */
.korisda-qr-panel {
  display: grid;
  grid-template-columns: 142px 1px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 17px 12px;
  background: linear-gradient(135deg, #f0fbf7, #f8fcfb);
  border: 1px solid #d9f1e9;
  border-radius: 14px;
}

.korisda-qr-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.korisda-qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 126px;
  height: 126px;
  padding: 5px;
  background: #fff;
  border: 1px solid #d8eee7;
  border-radius: 9px;
}

.korisda-qr-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.korisda-qr-caption {
  margin: 10px 0 0;
  color: #718b85;
  font-size: 12px;
  text-align: center;
}

.korisda-qr-divider {
  width: 1px;
  height: 115px;
  background: #d2e8e1;
}

.korisda-qr-info {
  min-width: 0;
}

.korisda-qr-info h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 18px;
  color: #168c70;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}

.korisda-wechat-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: white;
  font-size: 11px;
  background: #0bbb7a;
  border-radius: 50%;
}

.korisda-benefits {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.korisda-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #71817e;
  font-size: 12px;
  line-height: 1.6;
}

.korisda-check {
  display: inline-flex;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  background: #12bd80;
  border-radius: 50%;
}

/* 电脑端咨询按钮 */
.korisda-pc-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 49px;
  margin-top: 20px;
  padding: 12px 15px;
  color: #fff !important;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none !important;
  background: linear-gradient(100deg, #08c579, #08b9c8);
  border-radius: 30px;
  box-shadow: 0 7px 17px rgba(0, 190, 145, .18);
  transition: filter .2s, transform .2s;
}

.korisda-pc-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.korisda-pc-button svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.korisda-arrow {
  margin-left: 2px;
  font-size: 25px;
  font-weight: 400;
  line-height: 18px;
}

/* 电话区域 */
.korisda-phone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding-top: 15px;
  color: #849692;
  font-size: 12px;
  border-top: 1px solid #e5efeb;
}

.korisda-phone svg {
  width: 17px;
  height: 17px;
  margin-right: 3px;
  color: #718a84;
}

.korisda-phone-number {
  color: #16856d !important;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.korisda-phone-name {
  white-space: nowrap;
}

/* 窄屏适配 */
@media (max-width: 380px) {
  .korisda-chat-modal {
    left: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .korisda-chat-body {
    padding: 15px 12px;
  }

  .korisda-qr-panel {
    grid-template-columns: 112px 1px minmax(0, 1fr);
    gap: 9px;
    padding: 12px 7px;
  }

  .korisda-qr-frame {
    width: 104px;
    height: 104px;
  }

  .korisda-qr-info h3 {
    gap: 5px;
    margin-bottom: 13px;
    font-size: 13px;
  }

  .korisda-benefits {
    gap: 12px;
  }

  .korisda-benefits li {
    gap: 5px;
    font-size: 11px;
  }

  .korisda-qr-caption {
    font-size: 11px;
  }

  .korisda-pc-button {
    gap: 7px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .korisda-chat-modal, .wxs-hint, .wxs-entry-btn .wxs-badge::before { animation-duration: .01ms !important; }
}
