/* Floating contact rail — glassmorphism, tooltips, responsive */

.floating-contact {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  pointer-events: none;
}

.floating-contact__glass {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  padding: 14px 11px;
  border-radius: 999px;
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.22) 45%,
    rgba(245, 247, 250, 0.35) 100%
  );
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 12px 40px rgba(11, 60, 93, 0.14),
    0 4px 14px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    inset 0 -1px 0 rgba(11, 60, 93, 0.06);
  animation: fc-glass-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes fc-glass-enter {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.floating-contact .fc-item {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
  flex-shrink: 0;
}

.floating-contact .fc-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.floating-contact .fc-item__icon svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

/* Brand surfaces */
.floating-contact .fc-item.whatsapp {
  background: linear-gradient(145deg, #2fe676 0%, #25d366 45%, #1da851 100%);
}

.floating-contact .fc-item.call {
  background: linear-gradient(145deg, #0d4a73 0%, #0b3c5d 50%, #082f49 100%);
}

.floating-contact .fc-item.instagram {
  background: linear-gradient(45deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
}

.floating-contact .fc-item.facebook {
  background: linear-gradient(145deg, #3b8cff 0%, #1877f2 55%, #0d65d9 100%);
}

.floating-contact .fc-item:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-contact .fc-item:focus-visible {
  outline: 2px solid #0b3c5d;
  outline-offset: 3px;
}

/* Tooltip (desktop / hover-capable) */
.floating-contact .fc-item::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(8px, -50%);
  background: #1f2937;
  color: #fff;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.25s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.floating-contact .fc-item:hover::after,
.floating-contact .fc-item:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

@media (max-width: 768px) {
  .floating-contact {
    right: 10px;
  }

  .floating-contact__glass {
    padding: 12px 9px;
    gap: 9px;
  }

  .floating-contact .fc-item {
    width: 42px;
    height: 42px;
  }

  .floating-contact .fc-item__icon svg {
    width: 19px;
    height: 19px;
  }

  /* Avoid covering thumb zones; keep tooltips off small screens */
  .floating-contact .fc-item::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-contact__glass {
    animation: none;
  }

  .floating-contact .fc-item {
    transition: none;
  }

  .floating-contact .fc-item:hover {
    transform: none;
  }

  .floating-contact .fc-item::after {
    transition: none;
  }
}
