/* ══════════════════════════════════════════
   GRA FLOATING CONTACT BUTTON
   Archivo: css/floating-contact.css
   Incluir en TODAS las páginas del sitio
   ══════════════════════════════════════════ */

.gra-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* ── Opciones expandidas ── */
.gra-float-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 200ms cubic-bezier(0.16,1,0.3,1),
              transform 200ms cubic-bezier(0.16,1,0.3,1);
}

.gra-float.open .gra-float-options {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ── Cada opción ── */
.gra-float-option {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.gra-float-option-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #0a0a0a;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.gra-float.open .gra-float-option-label {
  opacity: 1;
  transform: translateX(0);
}

.gra-float.open .gra-float-options .gra-float-option:nth-child(1) .gra-float-option-label {
  transition-delay: 60ms;
}
.gra-float.open .gra-float-options .gra-float-option:nth-child(2) .gra-float-option-label {
  transition-delay: 30ms;
}

.gra-float-option-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  transition: transform 150ms ease, box-shadow 150ms ease;
  flex-shrink: 0;
}

.gra-float-option:hover .gra-float-option-icon {
  transform: scale(1.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* WhatsApp */
.gra-float-option-icon.wa {
  background: #25D366;
}

/* Email */
.gra-float-option-icon.email {
  background: #1D9E75;
}

.gra-float-option-icon svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

/* ── Botón principal ── */
.gra-float-trigger {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #085041;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(8,80,65,0.35);
  transition: transform 150ms ease,
              box-shadow 150ms ease,
              background 150ms ease;
  position: relative;
  flex-shrink: 0;
}

.gra-float-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(8,80,65,0.45);
}

/* Ícono del trigger — dos estados */
.gra-float-trigger-icon {
  position: absolute;
  transition: opacity 180ms ease, transform 180ms ease;
}

.gra-float-trigger-icon.chat {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.gra-float-trigger-icon.close {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
}

.gra-float.open .gra-float-trigger-icon.chat {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}

.gra-float.open .gra-float-trigger-icon.close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.gra-float-trigger svg {
  width: 22px;
  height: 22px;
  fill: #ffffff;
}

/* ── Pulse en el trigger cuando está cerrado ── */
.gra-float-trigger::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #085041;
  opacity: 0;
  animation: gra-pulse 2.5s ease-out infinite;
}

.gra-float.open .gra-float-trigger::after {
  animation: none;
}

@keyframes gra-pulse {
  0%   { transform: scale(1); opacity: 0.4; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .gra-float {
    bottom: 20px;
    right: 20px;
  }
  .gra-float-option-label {
    display: none;
  }
}
