.guga-social-float {
  --guga-social-size: 54px;
  position: fixed;
  inset-inline-end: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(var(--guga-contact-bottom, 16px), env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: grid;
  gap: 8px;
  transition: opacity 160ms ease, visibility 160ms ease;
}

html[dir="rtl"] .guga-social-float {
  inset-inline-end: max(16px, env(safe-area-inset-left, 0px));
}

.guga-social-link {
  display: grid;
  width: var(--guga-social-size);
  height: var(--guga-social-size);
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 10px 28px rgba(41, 4, 5, .24);
  touch-action: manipulation;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.guga-social-instagram { background: #641619; }
.guga-social-whatsapp { background: #440709; }

.guga-social-link svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.guga-social-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px #440709, 0 12px 30px rgba(41, 4, 5, .3);
}

body.menu-open .guga-social-float,
body.search-open .guga-social-float {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .guga-social-link:hover {
    box-shadow: 0 14px 34px rgba(41, 4, 5, .3);
    transform: translateY(-2px);
  }
}

@media (max-width: 767px) {
  .guga-social-float {
    --guga-social-size: 54px;
    inset-inline-end: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  html[dir="rtl"] .guga-social-float {
    inset-inline-end: max(12px, env(safe-area-inset-left, 0px));
  }

  body:has(form :is(input, select, textarea):focus) .guga-social-float {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guga-social-float,
  .guga-social-link { transition: none; }
}

@media print {
  .guga-social-float { display: none !important; }
}
