/* Floating Action Buttons - Glassmorphism Design with Animated Outline */
.mil-floating-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mil-floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Glassmorphism base styles */
.mil-floating-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s ease;
}

/* Animated thin round line border */
.mil-floating-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  animation: rotateOutline 3s linear infinite;
}

/* Animated outline rotation */
@keyframes rotateOutline {
  0% {
    transform: rotate(0deg);
    border-color: rgba(255, 255, 255, 0.3);
  }
  25% {
    border-color: rgba(255, 255, 255, 0.6);
  }
  50% {
    transform: rotate(180deg);
    border-color: rgba(255, 255, 255, 0.3);
  }
  75% {
    border-color: rgba(255, 255, 255, 0.6);
  }
  100% {
    transform: rotate(360deg);
    border-color: rgba(255, 255, 255, 0.3);
  }
}

.mil-floating-btn:hover {
  transform: translateY(-3px);
}

.mil-floating-btn:hover::before {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mil-floating-btn:hover::after {
  animation-duration: 1.5s;
  border-width: 2px;
}

.mil-floating-btn:active {
  transform: translateY(-1px);
}

/* WhatsApp button specific styling */
.mil-whatsapp-btn {
  background: rgba(37, 211, 102, 0.2);
  color: #25D366;
}

.mil-whatsapp-btn::before {
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.mil-whatsapp-btn::after {
  border: 1px solid rgba(37, 211, 102, 0.4);
  animation: rotateOutlineWhatsApp 3s linear infinite;
}

@keyframes rotateOutlineWhatsApp {
  0% {
    transform: rotate(0deg);
    border-color: rgba(37, 211, 102, 0.4);
  }
  25% {
    border-color: rgba(37, 211, 102, 0.8);
  }
  50% {
    transform: rotate(180deg);
    border-color: rgba(37, 211, 102, 0.4);
  }
  75% {
    border-color: rgba(37, 211, 102, 0.8);
  }
  100% {
    transform: rotate(360deg);
    border-color: rgba(37, 211, 102, 0.4);
  }
}

.mil-whatsapp-btn:hover::before {
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid rgba(37, 211, 102, 0.4);
}

.mil-whatsapp-btn:hover::after {
  animation-duration: 1.5s;
  border-width: 2px;
}

/* AI button specific styling */
.mil-ai-btn {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

.mil-ai-btn::before {
  background: rgba(102, 126, 234, 0.1);
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.mil-ai-btn::after {
  border: 1px solid rgba(102, 126, 234, 0.4);
  animation: rotateOutlineAI 3s linear infinite;
}

@keyframes rotateOutlineAI {
  0% {
    transform: rotate(0deg);
    border-color: rgba(102, 126, 234, 0.4);
  }
  25% {
    border-color: rgba(102, 126, 234, 0.8);
  }
  50% {
    transform: rotate(180deg);
    border-color: rgba(102, 126, 234, 0.4);
  }
  75% {
    border-color: rgba(102, 126, 234, 0.8);
  }
  100% {
    transform: rotate(360deg);
    border-color: rgba(102, 126, 234, 0.4);
  }
}

.mil-ai-btn:hover::before {
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.4);
}

.mil-ai-btn:hover::after {
  animation-duration: 1.5s;
  border-width: 2px;
}

.mil-floating-btn i {
  font-size: 24px;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 2;
}

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

/* Pulse animation for WhatsApp button */
.mil-whatsapp-btn .mil-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.3);
  animation: pulse 2s infinite;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* Hide original back to top button completely */
.mil-frame .mil-frame-bottom .mil-back-to-top,
.mil-frame .mil-frame-bottom .mil-back-to-top *,
.mil-back-to-top.mil-frame-bottom,
.mil-back-to-top.mil-frame-bottom * {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Simple Back to Top Button - Just Arrow */
.mil-back-to-top:not(.mil-frame-bottom) {
  position: fixed !important;
  bottom: 30px !important;
  left: 30px !important;
  width: 50px !important;
  height: 50px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  border: 2px solid #ffffff !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 1000 !important;
  transform: none !important;
  -webkit-transform: none !important;
  pointer-events: all !important;
  padding: 0 !important;
}

.mil-back-to-top:not(.mil-frame-bottom):hover {
  transform: translateY(-2px) !important;
  background: rgba(0, 0, 0, 0.9) !important;
}

.mil-back-to-top:not(.mil-frame-bottom) .mil-link {
  color: #ffffff !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  font-size: 0 !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.mil-back-to-top:not(.mil-frame-bottom) .mil-link::after {
  content: '▲' !important;
  font-size: 20px !important;
  font-weight: bold !important;
  color: #ffffff !important;
  transition: transform 0.3s ease !important;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8) !important;
}

.mil-back-to-top:not(.mil-frame-bottom):hover .mil-link::after {
  transform: scale(1.1) !important;
}

.mil-back-to-top:not(.mil-frame-bottom) .mil-link span {
  display: none !important;
}

/* Responsive design for floating buttons */
@media (max-width: 768px) {
  .mil-floating-buttons {
    bottom: 20px;
    right: 20px;
    gap: 12px;
  }
  
  .mil-floating-btn {
    width: 50px;
    height: 50px;
  }
  
  .mil-floating-btn i {
    font-size: 20px;
  }
  
  .mil-back-to-top:not(.mil-frame-bottom) {
    bottom: 20px !important;
    left: 20px !important;
  }
  
  .mil-back-to-top:not(.mil-frame-bottom) .mil-link::after {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .mil-floating-buttons {
    bottom: 15px;
    right: 15px;
    gap: 10px;
  }
  
  .mil-floating-btn {
    width: 45px;
    height: 45px;
  }
  
  .mil-floating-btn i {
    font-size: 18px;
  }
  
  .mil-back-to-top:not(.mil-frame-bottom) {
    bottom: 15px !important;
    left: 15px !important;
  }
  
  .mil-back-to-top:not(.mil-frame-bottom) .mil-link::after {
    font-size: 16px !important;
  }
}