/* LOST — современный плавающий виджет: VK / Telegram / Max / звонок.
   Заменяет legacy .callback-vidget и .callback-call-widget. */

.callback-vidget {
  display: none !important;
}

.callback-call-widget {
  display: none !important;
}

.lost-social-float {
  --lost-sf-size: 50px;
  --lost-sf-gap: 10px;
  --lost-sf-phone-space: 0px;

  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px + var(--lost-sf-phone-space));
  z-index: 1002;
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.lost-social-float__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--lost-sf-gap);
  pointer-events: auto;
  animation: lost-sf-float 5.2s ease-in-out 0.6s infinite;
}

.lost-social-float__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--lost-sf-size);
  height: var(--lost-sf-size);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  overflow: visible;
  opacity: 1;
  transform: none;
  transition: transform 0.25s ease, filter 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  animation: lost-sf-btn-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lost-social-float__btn:nth-child(1) { animation-delay: 0.05s; }
.lost-social-float__btn:nth-child(2) { animation-delay: 0.12s; }
.lost-social-float__btn:nth-child(3) { animation-delay: 0.2s; }
.lost-social-float__btn:nth-child(4) { animation-delay: 0.27s; }

.lost-social-float__btn--vk,
.lost-social-float__btn--tg,
.lost-social-float__btn--max,
.lost-social-float__btn--phone {
  background: var(--lost-accent-primary-grad, linear-gradient(180deg, #e23a4b 0%, #d12b3c 100%));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.lost-social-float__glow {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 70%);
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

/* Одно пульсирующее кольцо на всю колонку — без рассинхрона размеров кнопок */
.lost-social-float__btn::before {
  content: none;
}

.lost-social-float__icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  transition: transform 0.25s ease;
}

.lost-social-float__icon svg,
.lost-social-float__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Max: обрезанный официальный глиф (белый на прозрачном), фиолетовый фон кнопки */
.lost-social-float__icon--max {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}

.lost-social-float__icon--max img {
  object-fit: contain;
}

.lost-social-float__label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(10px, -50%);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 11, 20, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--lost-font-family, Inter, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.lost-social-float__label::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: inherit;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-50%) rotate(-45deg);
}

.lost-social-float__btn:hover,
.lost-social-float__btn:focus-visible {
  transform: translateY(-3px) scale(1.08);
  filter: brightness(1.08);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  outline: none;
}

.lost-social-float__btn:hover .lost-social-float__glow,
.lost-social-float__btn:focus-visible .lost-social-float__glow {
  opacity: 1;
}

.lost-social-float__btn:hover .lost-social-float__icon,
.lost-social-float__btn:focus-visible .lost-social-float__icon {
  transform: scale(1.1) rotate(-6deg);
}

.lost-social-float__btn:hover .lost-social-float__label,
.lost-social-float__btn:focus-visible .lost-social-float__label {
  opacity: 1;
  transform: translate(0, -50%);
}

.lost-social-float__btn:active {
  transform: translateY(0) scale(0.96);
  filter: brightness(0.96);
}

@keyframes lost-sf-btn-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes lost-sf-float {
  0%,
  100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes lost-sf-ring {
  0% {
    opacity: 0.45;
    transform: scale(0.85);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

body.no_body .lost-social-float,
body.lost-nav-menu-open .lost-social-float,
body:has(.lost-nav-menu.is-open) .lost-social-float,
body.lost-booking-modal-open .lost-social-float,
body:has(.lost-home-booking-modal.is-open) .lost-social-float,
body:has(.block_to_zakaz.open) .lost-social-float {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (min-width: 1200px) {
  .lost-social-float {
    --lost-sf-phone-space: 0px;
    --lost-sf-size: 52px;
    right: max(18px, env(safe-area-inset-right, 0px));
    bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  }
}

@media (max-width: 1199px) {
  .lost-social-float {
    --lost-sf-phone-space: 62px;
    --lost-sf-size: 48px;
    --lost-sf-gap: 8px;
  }
}

@media (max-width: 390px) {
  .lost-social-float {
    --lost-sf-phone-space: 58px;
    --lost-sf-size: 44px;
    right: max(12px, env(safe-area-inset-right, 0px));
  }
}

body.lost-quest-detail-v2.has-qd-sticky-visible .lost-social-float {
  --lost-sf-phone-space: 78px;
}

@media (prefers-reduced-motion: reduce) {
  .lost-social-float__rail,
  .lost-social-float__btn,
  .lost-social-float__btn::before {
    animation: none !important;
  }
}
