/* Floating Action Buttons */
.floating-buttons {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999; /* Increased z-index */
  display: flex;
  flex-direction: column; /* Normal direction - first item (WhatsApp) at bottom */
  gap: 15px;
}

.floating-btn {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.floating-btn-icon {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.floating-btn-text {
  position: absolute;
  left: 70px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 15px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.floating-btn:hover .floating-btn-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.floating-btn:hover .floating-btn-icon {
  transform: scale(1.1);
}

/* Spin Wheel Button - Make it appear on top */
.floating-buttons .spin-wheel-btn {
  order: -1; /* This ensures spin wheel appears above WhatsApp */
  position: relative;
  z-index: 10001;
}

.spin-wheel-btn .floating-btn-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  animation: pulse 2s infinite;
}

/* Pulse Animation for Spin Wheel Button */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
  }
}

.spin-wheel-btn:hover .floating-btn-icon {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  animation: none;
}

/* WhatsApp Button */
.whatsapp-btn .floating-btn-icon {
  background: #25D366;
}

.whatsapp-btn:hover .floating-btn-icon {
  background: #128C7E;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* RTL Support */
.rtl .floating-buttons {
  left: auto;
  right: 20px;
}

.rtl .floating-btn-text {
  left: auto;
  right: 70px;
  transform: translateX(10px);
}

.rtl .floating-btn:hover .floating-btn-text {
  transform: translateX(0);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .floating-buttons {
    bottom: 70px; /* Higher position on mobile to avoid bottom navigation */
  }
  
  .floating-btn-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .floating-btn-text {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Spin Wheel Modal Styles */
#spinWheelModal .modal-content {
  background: #f5f7fa;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#spinWheelModal .btn-close {
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 1;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 10px !important;
  top: 10px !important;
}

#spinWheelModal .btn-close:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

#spinWheelModal .modal-dialog {
  margin: 1.75rem auto;
}

@media (max-width: 768px) {
  #spinWheelModal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem) !important;
  }
  
  #spinWheelModal iframe {
    height: 500px !important;
  }
}