.qc {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.qc__fab {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: none;
  border-radius: 50%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px rgba(17, 172, 247, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  overflow: hidden;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.qc__fab:hover {
  background: #0d96db;
  box-shadow: 0 10px 28px rgba(17, 172, 247, 0.45);
}

.qc__fab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.qc__fab-icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.qc__fab-icon--close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.85);
}

.qc.is-open .qc__fab-icon--phone {
  opacity: 0;
  transform: rotate(45deg) scale(0.85);
}

.qc.is-open .qc__fab-icon--close {
  opacity: 1;
  transform: none;
}

.qc__panel {
  width: min(280px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid rgba(23, 23, 23, 0.12);
  box-shadow: 0 12px 32px rgba(23, 23, 23, 0.16);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.qc__panel[hidden] {
  display: none;
}

.qc__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--ink);
  transition: background 0.15s ease;
}

.qc__item:hover {
  background: var(--bg);
}

.qc__item-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qc__item-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qc__item-text strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.qc__item-text span {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .qc {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .qc__fab {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    max-width: 52px;
    max-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qc__fab,
  .qc__fab-icon,
  .qc__item {
    transition: none;
  }
}
