.cx-cs-widget {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.cx-cs-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 72px;
  padding: 8px 10px 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.08);
  transition: box-shadow 0.2s ease;
  overflow: visible;
}

.cx-cs-widget:hover .cx-cs-panel {
  box-shadow: 0 14px 48px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.1);
}

.cx-cs-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #94a3b8;
  transform: rotate(180deg);
  transition: transform 0.2s ease, color 0.2s ease;
}

.cx-cs-drag-handle {
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cx-cs-widget.is-dragging .cx-cs-drag-handle {
  cursor: grabbing;
}

.cx-cs-widget.is-dragging .cx-cs-item--wa {
  max-height: 0;
  opacity: 0;
}

.cx-cs-widget.is-dragging .cx-cs-qr-pop {
  opacity: 0;
  visibility: hidden;
}

.cx-cs-widget:hover .cx-cs-chevron {
  transform: rotate(0deg);
  color: #64748b;
}

.cx-cs-item {
  position: relative;
  width: 100%;
}

.cx-cs-item--wa {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
}

.cx-cs-widget:hover .cx-cs-item--wa {
  max-height: 96px;
  opacity: 1;
  margin-top: 2px;
  overflow: visible;
}

.cx-cs-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.cx-cs-item--wa .cx-cs-btn {
  cursor: default;
}

.cx-cs-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  transition: transform 0.15s ease;
}

.cx-cs-item--tg .cx-cs-btn:hover .cx-cs-icon {
  transform: scale(1.06);
}

.cx-cs-icon--wa {
  background: linear-gradient(145deg, #25d366, #128c7e);
}

.cx-cs-icon--tg {
  background: linear-gradient(145deg, #2aabee, #229ed9);
}

.cx-cs-label {
  font-size: 12px;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
}

.cx-cs-qr-pop {
  position: absolute;
  right: calc(100% + 14px);
  bottom: 0;
  width: 196px;
  padding: 14px 14px 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  z-index: 2;
}

.cx-cs-widget:has(.cx-cs-item--wa:hover) .cx-cs-qr-pop,
.cx-cs-item--wa:hover .cx-cs-qr-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.cx-cs-qr-pop img {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fafc;
}

.cx-cs-qr-pop p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #475569;
  text-align: center;
}

@media (max-width: 640px) {
  .cx-cs-widget {
    right: 12px;
    bottom: 16px;
  }

  .cx-cs-qr-pop {
    right: calc(100% + 8px);
    width: 168px;
    padding: 10px;
  }

  .cx-cs-qr-pop img {
    width: 140px;
    height: 140px;
  }
}
