.official-customer-service-widget[hidden],
.customer-service-widget-modal[hidden] {
  display: none !important;
}

.official-customer-service-widget {
  position: fixed;
  top: 50%;
  right: 28px;
  z-index: 80;
  transform: translateY(-50%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

.customer-service-widget-card {
  width: 176px;
  overflow: hidden;
  border: 1px solid #dce8fb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(36, 86, 166, .16);
}

.customer-service-widget-head {
  padding: 14px 16px;
  background: linear-gradient(135deg, #3984ff, #236af1);
  color: #fff;
}

.customer-service-widget-head strong,
.customer-service-widget-head small,
.customer-service-widget-item span,
.customer-service-widget-item strong,
.customer-service-widget-item small {
  display: block;
}

.customer-service-widget-head strong {
  font-size: 15px;
}

.customer-service-widget-head small {
  margin-top: 2px;
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
}

.customer-service-widget-list {
  padding: 4px 14px 8px;
}

.customer-service-widget-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  background: transparent;
  color: #17233c;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.customer-service-widget-item:last-child {
  border-bottom: 0;
}

.customer-service-widget-item:hover strong {
  color: #1f66ff;
}

.customer-service-widget-icon {
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
}

.customer-service-widget-icon.wechat {
  background: #20c765;
}

.customer-service-widget-icon.qq {
  background: #fff;
  box-shadow: inset 0 0 0 1px #edf1f7;
}

.customer-service-widget-icon svg {
  display: block;
  width: 26px;
  height: 26px;
}

.customer-service-widget-item strong {
  font-size: 14px;
  transition: color .2s ease;
}

.customer-service-widget-item small {
  margin-top: 2px;
  color: #9aa7bc;
  font-size: 10px;
}

.customer-service-widget-toggle {
  display: none;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3984ff, #236af1);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 102, 255, .28);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.customer-service-widget-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 24, 48, .52);
  backdrop-filter: blur(3px);
}

.customer-service-widget-dialog {
  position: relative;
  width: min(360px, 100%);
  padding: 28px 30px 30px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(7, 27, 64, .26);
  text-align: center;
}

.customer-service-widget-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8a97aa;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.customer-service-widget-dialog h3 {
  margin: 0 0 16px;
  color: #15213a;
  font-size: 20px;
}

.customer-service-widget-qr {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid #e0e8f5;
  border-radius: 12px;
  object-fit: contain;
}

.customer-service-widget-account-label {
  margin: 16px 0 0;
  color: #8492aa;
  font-size: 12px;
}

.customer-service-widget-account {
  margin: 4px 0 0;
  color: #18233b;
  font-size: 18px;
  font-weight: 900;
  word-break: break-all;
}

@media (max-width: 900px) {
  .official-customer-service-widget {
    top: auto;
    right: 16px;
    bottom: 24px;
    transform: none;
  }

  .customer-service-widget-toggle {
    display: block;
  }

  .customer-service-widget-card {
    position: absolute;
    right: 0;
    bottom: 60px;
    display: none;
  }

  .official-customer-service-widget.expanded .customer-service-widget-card {
    display: block;
  }
}
