:root {
  --fab-size: 56px;
  --fab-radius: 28px;
  --fab-gap: 12px;
  --fab-bg: #0069c8; 
  --fab-fg: #fff;
  --fab-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  --menu-bg: #fff;
  --menu-radius: 12px;
  --menu-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.contact-fab {
  position: fixed;
  inset: auto 20px 20px auto; 
  z-index: 9999;
  touch-action: none; 
}

.fab-btn {
  width: var(--fab-size);
  height: var(--fab-size);
  border: 0;
  border-radius: 50%;
  background: var(--fab-bg);
  color: var(--fab-fg);
  box-shadow: var(--fab-shadow);
  cursor: grab;
  display: grid;
  place-items: center;
  font-size: 20px;
  transition: transform 0.15s ease;
}
.fab-btn:active {
  cursor: grabbing;
  transform: scale(0.98);
}
.fab-btn .close {
  display: none;
}

.fab-menu {
  position: absolute;
  bottom: calc(var(--fab-size) + 14px);
  right: 0;
  min-width: 230px;
  padding: 12px 0;
  background: var(--menu-bg);
  color: #333;
  border-radius: var(--menu-radius);
  box-shadow: var(--menu-shadow);
  display: none;
}
.fab-menu.open {
  display: block;
  animation: pop 0.18s ease;
}

.fab-pointer {
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 16px;
  height: 16px;
  background: var(--menu-bg);
  transform: rotate(45deg);
  box-shadow: var(--menu-shadow);
  clip-path: inset(-50% 0 0 -50%);
}

.fab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
}
.fab-item i {
  width: 22px;
  text-align: center;
}
.fab-item:hover {
  background: #f6f7f8;
}

@keyframes pop {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.contact-fab[aria-expanded="true"] .fab-btn .open {
  display: none;
}
.contact-fab[aria-expanded="true"] .fab-btn .close {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .fab-btn,
  .fab-menu {
    transition: none;
    animation: none;
  }
}

@media (max-width: 480px) {
  .contact-fab {
    inset: auto 14px 14px auto;
  }
  .fab-menu {
    min-width: 210px;
  }
}
