/* ===== Floating Social Button ===== */
.social-float {
  position: fixed;
  right: 24px;
  bottom: 90px; /* thoda upar taaki footer/scroll-top button se overlap na ho */
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
}

/* ---- Individual social items ---- */
.social-float__item {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(20px) scale(0.4) rotate(-45deg);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              transform 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              box-shadow 0.25s ease;
}

.social-float.is-open .social-float__item {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
  pointer-events: auto;
}

/* Staggered pop-in, bottom item first */
.social-float.is-open .social-float__item:nth-child(1) { transition-delay: 0.02s; }
.social-float.is-open .social-float__item:nth-child(2) { transition-delay: 0.09s; }
.social-float.is-open .social-float__item:nth-child(3) { transition-delay: 0.16s; }
.social-float.is-open .social-float__item:nth-child(4) { transition-delay: 0.23s; }

/* Closing: reverse-stagger so top icon tucks away first */
.social-float:not(.is-open) .social-float__item:nth-child(1) { transition-delay: 0.12s; }
.social-float:not(.is-open) .social-float__item:nth-child(2) { transition-delay: 0.06s; }
.social-float:not(.is-open) .social-float__item:nth-child(3) { transition-delay: 0s; }
.social-float:not(.is-open) .social-float__item:nth-child(4) { transition-delay: 0s; }

.social-float__item.whatsapp { background: #25d366; }
.social-float__item.call { background: linear-gradient(135deg, #cda05f 0%, #B08D57 60%, #96753f 100%); }
.social-float__item.instagram {
  background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social-float__item.facebook { background: #1877f2; }

.social-float__item:hover,
.social-float__item:focus-visible {
  transform: translateY(0) scale(1.15) rotate(0deg) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  color: #fff !important;
}

.social-float__item span[class^="icon-"] {
  transition: transform 0.3s ease;
}

.social-float__item:hover span[class^="icon-"] {
  transform: scale(1.12) rotate(-8deg);
}

/* ---- Toggle button ---- */
.social-float__toggle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #cda05f 0%, #B08D57 60%, #96753f 100%);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(176, 141, 87, 0.55);
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease;
}

.social-float__toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(176, 141, 87, 0.7);
}

.social-float__toggle:active {
  transform: scale(0.94);
}

.social-float.is-open .social-float__toggle {
  transform: rotate(225deg);
}

.social-float.is-open .social-float__toggle:hover {
  transform: rotate(225deg) scale(1.08);
}

/* Pulsing attention ring, pauses once opened */
.social-float__toggle::before,
.social-float__toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(176, 141, 87, 0.55);
  z-index: -1;
  animation: social-float-pulse 2.6s ease-out infinite;
}

.social-float__toggle::after {
  animation-delay: 1.3s;
}

.social-float.is-open .social-float__toggle::before,
.social-float.is-open .social-float__toggle::after {
  animation-play-state: paused;
  opacity: 0;
}

@keyframes social-float-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.social-float__toggle-icon {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.3s ease;
  font-size: 22px;
}

.social-float__toggle-icon--close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.7);
}

.social-float.is-open .social-float__toggle-icon--open {
  opacity: 0;
  transform: rotate(90deg) scale(0.7);
}

.social-float.is-open .social-float__toggle-icon--close {
  opacity: 1;
  transform: rotate(-225deg) scale(1); /* keeps close icon upright despite parent rotation */
}

/* Gentle idle bob on the whole widget when closed, draws the eye without being annoying */
@keyframes social-float-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.social-float:not(.is-open) .social-float__toggle {
  animation: social-float-bob 3.2s ease-in-out infinite;
}

@media (max-width: 576px) {
  .social-float {
    right: 16px;
    bottom: 78px;
  }
  .social-float__toggle {
    width: 52px;
    height: 52px;
    font-size: 21px;
  }
  .social-float__item {
    width: 44px;
    height: 44px;
    font-size: 18px;
    margin-bottom: 12px;
  }
}
