/* Contact widget — ported from bidusdigital.ru (.contact-fixed) */
.contact-fixed {
  position: fixed;
  right: 35px;
  bottom: 30px;
  z-index: 99;
  /* Pulse ring scales beyond the button — don't push page width */
  overflow: visible;
  pointer-events: none;
}
.contact-fixed .contact-fixed__but,
.contact-fixed .contact-fixed__link {
  pointer-events: auto;
}
.contact-fixed:not(.open) .contact-fixed__link a,
.contact-fixed:not(.open) .contact-fixed__link p {
  margin: 0 !important;
}
.contact-fixed.open .contact-fixed__info {
  opacity: 0;
  visibility: hidden;
}
.contact-fixed.open .contact-fixed__but::before {
  background: rgba(89, 89, 89, 0.3);
  box-shadow: 0 4px 20px rgba(89, 89, 89, 0.3);
}
.contact-fixed.open .contact-fixed__but div {
  transform: scale(0);
  opacity: 0;
}
.contact-fixed.open .contact-fixed__but s {
  transform: scale(1);
  opacity: 1;
}
.contact-fixed.open .contact-fixed__link {
  opacity: 1;
}
.contact-fixed:not(.open)::before,
.contact-fixed:not(.open)::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: rgba(222, 10, 54, 0.6);
  z-index: 0;
}
.contact-fixed:not(.open)::before {
  animation: 3s pulse 0s linear infinite;
}
.contact-fixed:not(.open)::after {
  animation: 3s pulse 1.5s linear infinite;
}
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

.contact-fixed__but {
  display: block;
  width: 60px;
  height: 60px;
  position: relative;
  cursor: pointer;
  z-index: 1;
  user-select: none;
}
.contact-fixed__but::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #de0a36;
  box-shadow: 0 4px 40px rgba(222, 10, 54, 0.2);
  z-index: 0;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.contact-fixed__but div {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.5s, opacity 0.5s;
}
.contact-fixed__but div span {
  display: block;
  width: 100%;
  height: 100%;
}
.contact-fixed__but div span i {
  display: flex;
  width: 100%;
  height: 100%;
}
.contact-fixed__but div span i img {
  display: block;
  width: auto;
  height: auto;
  margin: auto;
}
.contact-fixed__but s {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.5s, opacity 0.5s;
  text-decoration: none;
}
.contact-fixed__but s img {
  display: block;
  width: auto;
  height: auto;
  margin: auto;
}

.contact-fixed__link {
  position: absolute;
  z-index: 0;
  width: 50px;
  height: 50px;
  top: 0;
  left: calc(50% - 25px);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.contact-fixed.open .contact-fixed__link {
  pointer-events: auto;
}
.contact-fixed__link a,
.contact-fixed__link p {
  position: absolute;
  width: 50px;
  height: 50px;
  display: flex;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(152, 152, 152, 0.15);
  border-radius: 50%;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: 0;
  transition: opacity 0.5s, margin 0.5s;
  color: #fff;
  text-decoration: none;
}
.contact-fixed__link a:nth-child(1),
.contact-fixed__link p:nth-child(1) {
  margin-top: -63px;
  z-index: 3;
}
.contact-fixed__link a:nth-child(2),
.contact-fixed__link p:nth-child(2) {
  margin-top: -121px;
  z-index: 2;
}
.contact-fixed__link a:nth-child(3),
.contact-fixed__link p:nth-child(3) {
  margin-top: -179px;
  z-index: 1;
}
.contact-fixed__link a img,
.contact-fixed__link p img,
.contact-fixed__link a svg,
.contact-fixed__link p svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: auto;
  color: #fff;
  fill: currentColor;
}
.contact-fixed__link a span,
.contact-fixed__link p span {
  position: absolute;
  padding: 0 7px;
  background: #000;
  top: 50%;
  right: calc(100% + 14px);
  text-align: left;
  transform: translateY(-50%);
  font-style: normal;
  white-space: nowrap;
  color: #fff;
  font-size: 11px;
  line-height: 25px;
  z-index: 2;
  border-radius: 4px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
  font-family: "Montserrat", sans-serif;
}
.contact-fixed__link a span::before,
.contact-fixed__link p span::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  right: -3px;
  top: calc(50% - 4px);
  background: #000;
  transform: rotate(45deg);
}

@media screen and (min-width: 1024px) {
  .contact-fixed__but:hover::before {
    transform: scale(1.08);
  }
  .contact-fixed__link a:hover span,
  .contact-fixed__link p:hover span {
    visibility: visible;
    opacity: 1;
  }
}
@media screen and (max-width: 1023px) {
  .contact-fixed {
    right: 12px;
    bottom: 24px;
  }
  .contact-fixed__but::before {
    transform: scale(0.9);
  }
  /* Softer pulse so rings stay inside the viewport */
  .contact-fixed:not(.open)::before,
  .contact-fixed:not(.open)::after {
    animation-name: pulse-mobile;
  }
  @keyframes pulse-mobile {
    0% {
      opacity: 1;
      transform: scale(1);
    }
    100% {
      opacity: 0;
      transform: scale(1.25);
    }
  }
  .contact-fixed__link a span,
  .contact-fixed__link p span {
    display: none;
  }
}
