/* File: css/floating-action-buttons.css */

.fab-container {
  position: fixed;
  bottom: 75px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Individual FAB Buttons */
.fab-button {
  position: relative;
}

.fab-button-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  width: 56px;
  height: 56px;
  justify-content: flex-start;
  position: relative;
}

.fab-button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  color: white;
  text-decoration: none;
  width: auto;
  padding-right: 20px;
}

/* Icon container */
.fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.fab-icon svg {
  width: 24px;
  height: 24px;
}

/* Text */
.fab-text {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 16px;
  font-weight: 500;
  padding-left: 8px;
}

.fab-button-link:hover .fab-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Specific button colors */
.fab-button:nth-child(1) .fab-button-link {
  background-color: #1976D2; /* Calendar blue */
}

.fab-button:nth-child(2) .fab-button-link {
  background-color: #25D366; /* WhatsApp green */
}

.fab-button:nth-child(3) .fab-button-link {
  background-color: #9C27B0; /* Purple for discounts */
}

.fab-button:nth-child(4) .fab-button-link {
  background-color: #FF5722; /* Orange for location */
}

/* Hover effects for specific colors */
.fab-button:nth-child(1) .fab-button-link:hover {
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.4);
}

.fab-button:nth-child(2) .fab-button-link:hover {
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.fab-button:nth-child(3) .fab-button-link:hover {
  box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4);
}

.fab-button:nth-child(4) .fab-button-link:hover {
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
}

/* Mobile Styles */
@media (max-width: 768px) {
  .fab-container {
    bottom: 80px; /* Adjust to avoid conflicts with existing sharing buttons */
    right: 15px;
  }

  .fab-button-link {
    width: 50px;
    height: 50px;
  }

  .fab-icon {
    width: 50px;
    height: 50px;
  }

  .fab-icon svg {
    width: 20px;
    height: 20px;
  }

  .fab-text {
    font-size: 13px;
  }

  /* On mobile, tap to expand instead of hover */
  .fab-button-link.expanded {
    width: auto;
    padding: 0 20px 0 0;
  }

  .fab-button-link.expanded .fab-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .fab-container {
    bottom: 70px;
    right: 10px;
  }

  .fab-button-link {
    width: 45px;
    height: 45px;
    font-size: 12px;
  }

  .fab-icon {
    width: 45px;
    height: 45px;
  }

  .fab-icon svg {
    width: 18px;
    height: 18px;
  }

  .fab-text {
    font-size: 12px;
  }
}

/* Ensure it doesn't conflict with existing sharing buttons */
.fab-container {
  pointer-events: auto;
}

.fab-container * {
  box-sizing: border-box;
}

/* Animation for subtle entrance */
@keyframes fabSlideIn {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fab-button {
  animation: fabSlideIn 0.5s ease-out;
  animation-delay: calc(var(--index, 0) * 0.1s);
  animation-fill-mode: both;
}

/* Add subtle pulse animation to first button */
@keyframes subtlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.fab-button:first-child .fab-button-link {
  animation: subtlePulse 3s infinite;
}

.fab-button:first-child .fab-button-link:hover {
  animation: none;
}
