/* ================================
   CONTACT FLOATING ACTION BUTTON
   Bottom-left shortcut panel
   ================================ */

.cfab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 9990;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 12px;
}

/* ── Trigger button ── */
.cfab-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #f4a7b9 0%, #d4849a 100%);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(212, 132, 154, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.cfab-trigger:hover {
  transform: scale(1.09);
  box-shadow: 0 10px 28px rgba(212, 132, 154, 0.55);
}

.cfab-trigger:active {
  transform: scale(0.95);
}

/* icon swap */
.cfab-icon-open,
.cfab-icon-close {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.cfab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.cfab.is-open .cfab-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.cfab.is-open .cfab-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.cfab.is-open .cfab-trigger {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
  box-shadow: 0 6px 20px rgba(26, 26, 46, 0.4);
}

/* ── Items container ── */
.cfab-items {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}

/* ── Individual action buttons ── */
.cfab-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  position: relative;
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  transition: opacity 0.22s ease, transform 0.22s ease,
              box-shadow 0.22s ease;
  pointer-events: none;
  flex-shrink: 0;
}

.cfab-item:hover {
  transform: translateY(0) scale(1.12) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.22);
}

/* stagger delays when opening */
.cfab.is-open .cfab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.cfab.is-open .cfab-item:nth-child(1) { transition-delay: 0.00s; }
.cfab.is-open .cfab-item:nth-child(2) { transition-delay: 0.05s; }
.cfab.is-open .cfab-item:nth-child(3) { transition-delay: 0.10s; }
.cfab.is-open .cfab-item:nth-child(4) { transition-delay: 0.15s; }

/* brand colours */
.cfab-item--instagram {
  background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.cfab-item--instagram2 {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}
.cfab-item--whatsapp {
  background: #25d366;
}
.cfab-item--email {
  background: linear-gradient(135deg, #f4a7b9, #d4849a);
}
.cfab-item--youtube {
  background: #ff0000;
}

/* ── Tooltip labels ── */
.cfab-item::before {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  background: rgba(26, 26, 46, 0.88);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Nunito', sans-serif;
  padding: 5px 10px;
  border-radius: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  backdrop-filter: blur(6px);
}

.cfab-item:hover::before {
  opacity: 1;
}

/* ── Pulse ring on trigger (idle) ── */
.cfab-trigger::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(244, 167, 185, 0.5);
  animation: cfab-pulse 2.4s ease-out infinite;
}

.cfab.is-open .cfab-trigger::after {
  display: none;
}

@keyframes cfab-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .cfab {
    bottom: 20px;
    left: 16px;
  }

  .cfab-trigger {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .cfab-item {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }

  /* move tooltip to right and ensure it doesn't overflow */
  .cfab-item::before {
    left: calc(100% + 8px);
    font-size: 0.7rem;
  }
}
