/* ==========================================
   ISKCON Ratlam - Floating Action Buttons
   WhatsApp & RailPrasadam floating buttons
   ========================================== */

/* Main FAB Container */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-end;
}

/* Individual FAB Button */
.fab-button {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  text-decoration: none;
  overflow: visible;
  animation: fadeInUp 0.6s ease-out;
}

.fab-button:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
}

.fab-button:active {
  transform: scale(0.95);
}

/* WhatsApp Button */
.fab-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  animation-delay: 0.1s;
}

.fab-whatsapp:hover {
  background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
}

/* RailPrasadam Button */
.fab-railprasadam {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  animation-delay: 0.2s;
}

.fab-railprasadam:hover {
  background: linear-gradient(135deg, #F7931E 0%, #FF6B35 100%);
}

/* Icon Styling */
.fab-icon {
  width: 32px;
  height: 32px;
  color: white;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.fab-button:hover .fab-icon {
  transform: scale(1.2) rotate(-5deg);
}

/* Tooltip Label */
.fab-label {
  position: absolute;
  right: 75px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fab-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid rgba(0, 0, 0, 0.85);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.fab-button:hover .fab-label {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Pulse Animation */
.fab-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Notification Badge (Optional) */
.fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff0000;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid white;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Ripple Effect */
.fab-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.fab-button:active::after {
  width: 100%;
  height: 100%;
}

/* Ripple Animation */
@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .fab-container {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }

  .fab-button {
    width: 55px;
    height: 55px;
  }

  .fab-icon {
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .fab-label {
    right: 70px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .fab-container {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }

  .fab-button {
    width: 50px;
    height: 50px;
  }

  .fab-icon {
    width: 26px;
    height: 26px;
    font-size: 22px;
  }

  .fab-label {
    font-size: 12px;
    padding: 5px 10px;
  }
}

/* Accessibility */
.fab-button:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 3px;
}

.fab-button:focus:not(:focus-visible) {
  outline: none;
}

/* Print - Hide FABs */
@media print {
  .fab-container {
    display: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .fab-button {
    border: 2px solid white;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .fab-button,
  .fab-icon,
  .fab-label,
  .fab-button::before,
  .fab-button::after {
    animation: none;
    transition: none;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  .fab-label {
    background: rgba(255, 255, 255, 0.95);
    color: #1F1F1F;
  }

  .fab-label::after {
    border-left-color: rgba(255, 255, 255, 0.95);
  }
}

/* Special Effects on Scroll */
.fab-container.scrolled .fab-button {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Hover Glow Effect */
.fab-whatsapp:hover {
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.6);
}

.fab-railprasadam:hover {
  box-shadow: 0 0 30px rgba(255, 107, 53, 0.6);
}

/* Loading State (Optional) */
.fab-button.loading {
  pointer-events: none;
  opacity: 0.7;
}

.fab-button.loading .fab-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
