.quick-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  justify-items: end;
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.quick-contact__menu {
  width: min(310px, calc(100vw - 28px));
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dce1e2;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 52px rgba(23, 63, 76, .22), 0 3px 12px rgba(0, 0, 0, .08);
  transform-origin: right bottom;
  animation: quick-contact-in .2s ease-out both;
}

.quick-contact__heading {
  display: grid;
  gap: 2px;
  padding: 5px 8px 12px;
  color: #242c30;
}

.quick-contact__heading strong {
  font-size: 16px;
  letter-spacing: -.01em;
}

.quick-contact__heading span {
  color: #626b6f;
  font-size: 13px;
}

.quick-contact__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #242c30;
  font-weight: 650;
  text-decoration: none;
  transition: background .16s ease, transform .16s ease;
}

.quick-contact__link:hover {
  background: #f3f5f5;
  transform: translateX(-2px);
}

.quick-contact__link + .quick-contact__link {
  margin-top: 3px;
}

.quick-contact__icon,
.quick-contact__toggle-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.quick-contact__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
}

.quick-contact__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.quick-contact__link--whatsapp .quick-contact__icon { background: #20b85a; }
.quick-contact__link--telegram .quick-contact__icon { background: #229ed9; }
.quick-contact__link--vk .quick-contact__icon { background: #2787f5; }

.quick-contact__toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 10px 18px 10px 14px;
  border: 0;
  border-radius: 999px;
  background: #173f4c;
  box-shadow: 0 10px 28px rgba(23, 63, 76, .28);
  color: #fff;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.quick-contact__toggle:hover {
  background: #0f3340;
  transform: translateY(-2px);
  box-shadow: 0 13px 34px rgba(23, 63, 76, .33);
}

.quick-contact__toggle-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-contact__status {
  position: absolute;
  top: 2px;
  left: 34px;
  width: 10px;
  height: 10px;
  border: 2px solid #173f4c;
  border-radius: 50%;
  background: #45d177;
  box-shadow: 0 0 0 0 rgba(69, 209, 119, .45);
  animation: quick-contact-pulse 2.6s ease-out 2;
}

.quick-contact--open .quick-contact__toggle { background: #c6412d; }
.quick-contact--open .quick-contact__status { display: none; }

body.quick-contact-ready .floating-actions {
  right: 180px;
}

@keyframes quick-contact-in {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@keyframes quick-contact-pulse {
  55% { box-shadow: 0 0 0 0 rgba(69, 209, 119, .42); }
  100% { box-shadow: 0 0 0 9px rgba(69, 209, 119, 0); }
}

@media (max-width: 760px) {
  .quick-contact {
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
  }

  .quick-contact--with-dock {
    bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .quick-contact__menu {
    padding: 10px;
  }

  .quick-contact__toggle {
    min-height: 52px;
    padding: 9px 15px 9px 12px;
  }

  body.quick-contact-ready .floating-actions {
    right: 163px;
  }
}

@media (max-width: 370px) {
  .quick-contact__toggle-label { display: none; }
  .quick-contact__toggle { width: 52px; padding: 0; justify-content: center; }
  .quick-contact__status { left: 33px; }
  body.quick-contact-ready .floating-actions { right: 75px; }
}

@media (prefers-reduced-motion: reduce) {
  .quick-contact__menu,
  .quick-contact__status { animation: none; }
  .quick-contact__link,
  .quick-contact__toggle { transition: none; }
}
