.customer-service-widget {
  position: fixed;
  top: 52%;
  right: 22px;
  z-index: 9995;
  transform: translateY(-50%);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.customer-service-trigger {
  position: relative;
  display: flex;
  width: 72px;
  min-height: 78px;
  padding: 11px 8px 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #22a9ef 0%, #06d4ba 100%);
  box-shadow: 0 12px 30px rgba(0, 187, 205, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.customer-service-trigger:hover,
.customer-service-trigger:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 15px 34px rgba(0, 187, 205, 0.38);
  outline: none;
}

.customer-service-trigger svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.customer-service-trigger-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.customer-service-status-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #42e57a;
  box-shadow: 0 0 0 3px rgba(66, 229, 122, 0.2);
}

.customer-service-card {
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  width: 228px;
  padding: 17px;
  border: 1px solid rgba(12, 197, 207, 0.2);
  border-radius: 18px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(11, 30, 54, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.customer-service-card::before {
  position: absolute;
  top: 50%;
  right: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  box-shadow: 1px -1px 0 rgba(12, 197, 207, 0.14);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.customer-service-card::after {
  position: absolute;
  top: 0;
  right: -16px;
  width: 18px;
  height: 100%;
  content: "";
}

.customer-service-widget:hover .customer-service-card,
.customer-service-widget:focus-within .customer-service-card,
.customer-service-widget.is-open .customer-service-card {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.customer-service-card-title {
  margin: 0;
  color: #111827;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.customer-service-card-subtitle {
  display: block;
  margin-top: 3px;
  color: #7b8493;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.customer-service-qr-link {
  display: block;
  width: 160px;
  margin: 13px auto 0;
  padding: 6px;
  border: 1px solid #e8eef2;
  border-radius: 13px;
  background: #fff;
}

.customer-service-qr {
  display: block;
  width: 146px;
  height: 146px;
  border-radius: 8px;
}

.customer-service-scan-tip {
  margin: 10px 0 0;
  color: #3d4756;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

.customer-service-hours {
  display: block;
  margin-top: 2px;
  color: #8b95a4;
  font-size: 12px;
  font-weight: 400;
}

@media (max-width: 767px) {
  .customer-service-widget {
    top: auto;
    right: 14px;
    bottom: 86px;
    transform: none;
  }

  .customer-service-trigger {
    width: 60px;
    min-height: 60px;
    padding: 8px 6px;
    border-radius: 17px;
  }

  .customer-service-trigger svg {
    width: 23px;
    height: 23px;
  }

  .customer-service-trigger-text {
    font-size: 12px;
  }

  .customer-service-status-dot {
    top: 7px;
    right: 7px;
  }

  .customer-service-card {
    top: auto;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(228px, calc(100vw - 28px));
    transform: translateY(8px);
  }

  .customer-service-card::before {
    top: auto;
    right: 24px;
    bottom: -6px;
    box-shadow: 1px 1px 0 rgba(12, 197, 207, 0.14);
  }

  .customer-service-card::after {
    top: 100%;
    right: 0;
    width: 100%;
    height: 14px;
  }

  .customer-service-widget:hover .customer-service-card,
  .customer-service-widget:focus-within .customer-service-card {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  .customer-service-widget.is-open .customer-service-card {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .customer-service-trigger,
  .customer-service-card {
    transition: none;
  }
}
