.quick-contacts {
  position: fixed;
  right: calc(22px + env(safe-area-inset-right, 0px));
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  gap: 9px;
}

.quick-contacts__link {
  --accent: #786391;
  position: relative;
  box-sizing: border-box;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #fbfaff;
  color: #25232a;
  box-shadow: 0 3px 12px #30223d22;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.quick-contacts__link[data-channel="whatsapp"] { --accent: #229954; }
.quick-contacts__link[data-channel="telegram"] { --accent: #0099d2; }
.quick-contacts__link[data-channel="max"] { --accent: #7254f3; }
.quick-contacts__link[data-channel="phone"] { --accent: #07949d; }

.quick-contacts__link img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  pointer-events: none;
}

.quick-contacts__tooltip {
  position: absolute;
  right: calc(100% + 9px);
  top: 50%;
  transform: translate(4px, -50%);
  padding: 7px 10px;
  border-radius: 8px;
  background: #30273b;
  color: #fff;
  font: 600 12px/1.2 system-ui, sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.quick-contacts__link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
.quick-contacts__link:focus-visible .quick-contacts__tooltip {
  opacity: 1;
  transform: translateY(-50%);
}

@media (hover: hover) {
  .quick-contacts__link:hover {
    transform: translateY(-2px) scale(1.08);
    border-color: color-mix(in srgb, var(--accent) 32%, white);
    box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 35%, transparent);
  }
  .quick-contacts__link:hover .quick-contacts__tooltip {
    opacity: 1;
    transform: translateY(-50%);
  }
}
.quick-contacts__link:active { transform: scale(.95); }

body:has(dialog[open]) .quick-contacts {
  visibility: hidden;
}

@media (max-width: 650px) {
  .quick-contacts {
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 7px;
  }
  .quick-contacts__link {
    width: 44px;
    height: 44px;
  }
  .quick-contacts__link img {
    width: 33px;
    height: 33px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-contacts__link,
  .quick-contacts__tooltip { transition: none; }
}
