.cfc-toolbar,
.cfc-toolbar *,
.cfc-toolbar *::before,
.cfc-toolbar *::after {
  box-sizing: border-box;
}

.cfc-toolbar {
  --cfc-right: 24px;
  --cfc-bottom: 100px;
  --cfc-bg: #fff;
  --cfc-text: #303945;
  --cfc-hover: #022248;
  position: fixed;
  z-index: 99990;
  right: var(--cfc-right);
  bottom: var(--cfc-bottom);
  display: flex;
  width: 78px;
  flex-direction: column;
  align-items: center;
  color: var(--cfc-text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.4;
}

.cfc-toolbar--centered {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.cfc-contact-pill {
  width: 78px;
  padding: 10px 8px;
  overflow: visible;
  border: 1px solid rgba(2, 34, 72, 0.1);
  border-radius: 39px;
  background: var(--cfc-bg);
  box-shadow: 0 8px 26px rgba(2, 34, 72, 0.16);
}

.cfc-item {
  position: relative;
  padding: 6px 0;
}

.cfc-item + .cfc-item::before {
  position: absolute;
  top: 0;
  right: 8px;
  left: 8px;
  height: 1px;
  background: rgba(48, 57, 69, 0.12);
  content: "";
}

.cfc-trigger,
.cfc-back-to-top {
  appearance: none;
  border: 0;
  margin: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.cfc-trigger {
  display: flex;
  width: 62px;
  min-height: 66px;
  padding: 7px 2px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 3px;
  color: var(--cfc-text);
  font-size: 12px;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease;
}

.cfc-item:first-child .cfc-trigger {
  border-radius: 31px 31px 3px 3px;
}

.cfc-item:last-child .cfc-trigger {
  border-radius: 3px 3px 31px 31px;
}

.cfc-icon {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  transition: transform 180ms ease;
}

.cfc-trigger:hover,
.cfc-trigger:focus-visible {
  color: var(--cfc-hover);
  background: rgba(2, 34, 72, 0.05);
  outline: none;
}

.cfc-trigger:hover .cfc-icon,
.cfc-trigger:focus-visible .cfc-icon {
  transform: scale(1.08);
}

.cfc-panel {
  position: absolute;
  top: 50%;
  right: calc(100% + 18px);
  display: flex;
  width: 210px;
  padding: 18px;
  visibility: hidden;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(2, 34, 72, 0.08);
  border-radius: 14px;
  background: var(--cfc-bg);
  box-shadow: 0 12px 36px rgba(2, 34, 72, 0.18);
  color: var(--cfc-text);
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.cfc-panel::after {
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(2, 34, 72, 0.08);
  border-right: 1px solid rgba(2, 34, 72, 0.08);
  background: var(--cfc-bg);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.cfc-panel strong {
  color: var(--cfc-hover);
  font-size: 17px;
  font-weight: 600;
}

.cfc-panel small {
  color: #667085;
  font-size: 12px;
  text-align: center;
}

.cfc-phone-number {
  color: var(--cfc-hover);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.cfc-phone-number:hover {
  text-decoration: underline;
}

.cfc-qr {
  display: block;
  width: 160px;
  height: 160px;
  border-radius: 4px;
  object-fit: contain;
}

.cfc-qr-placeholder {
  display: grid;
  width: 160px;
  min-height: 120px;
  padding: 15px;
  place-items: center;
  border: 1px dashed #98a2b3;
  border-radius: 6px;
  background: #f8fafc;
  color: #667085;
  font-size: 13px;
  text-align: center;
}

.cfc-empty {
  color: #667085;
  font-size: 13px;
}

@media (hover: hover) and (pointer: fine) {
  .cfc-item:hover .cfc-panel {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
  }
}

.cfc-back-to-top {
  display: grid;
  width: 76px;
  height: 76px;
  margin-top: 24px;
  place-items: center;
  border: 1px solid rgba(2, 34, 72, 0.1);
  border-radius: 50%;
  background: var(--cfc-bg);
  box-shadow: 0 8px 26px rgba(2, 34, 72, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cfc-back-to-top:hover,
.cfc-back-to-top:focus-visible {
  outline: none;
  box-shadow: 0 10px 30px rgba(2, 34, 72, 0.24);
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .cfc-toolbar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cfc-toolbar *,
  .cfc-toolbar *::before,
  .cfc-toolbar *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
