/* TerraStroy — Floating Contacts */

.tsFloatingContacts {
  position: fixed;
  top: 50%;
  right: 16px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transform: translateY(-50%);
}

.tsFloatingContactsLink {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  text-decoration: none;
  transition:
    transform 180ms ease,
    background-color 180ms ease;
}

.tsFloatingContactsLink img,
.tsFloatingContactsIcon {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: contain;
}

.tsFloatingContactsLink:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 1);
}

.tsFloatingContactsLink:focus-visible {
  outline: 3px solid #995735;
  outline-offset: 3px;
}

@media (max-width: 1200px) {
  .tsFloatingContacts {
    right: 10px;
  }
}

@media (max-width: 700px) {
  .tsFloatingContacts {
    top: auto;
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 50%;
    flex-direction: row;
    gap: 8px;
    max-width: calc(100vw - 20px);
    padding: 7px;
    border-radius: 40px;
    /* A moving mobile viewport no longer repaints a live blurred background. */
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    transform: translateX(-50%);
  }

  .tsFloatingContactsLink {
    width: 42px;
    height: 42px;
  }

  .tsFloatingContactsLink img,
  .tsFloatingContactsIcon {
    width: 30px;
    height: 30px;
  }

  /*
   * При открытом полноэкранном меню
   * плавающая панель скрывается.
   */
  body:has(.tsHeader.isMenuOpen) .tsFloatingContacts {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tsFloatingContactsLink {
    transition: none;
  }
}