/* Floating Action Buttons Styles */
.floating-buttons {
  position: fixed !important;
  right: 30px !important;
  bottom: 30px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
  z-index: 999999 !important;
  align-items: flex-end !important;
  pointer-events: auto !important;
}

.floating-btn {
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  border: none !important;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  outline: none !important;
  box-sizing: border-box;
  flex-shrink: 0;
  padding: 0 !important;
  margin: 0 !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 auto !important;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1 !important;
  font-size: 0 !important; /* Hide text nodes */
  background-clip: padding-box;
  overflow: hidden; /* Ensure rounded corners */
  z-index: 2;
}

.floating-btn i {
  font-size: 26px;
  color: #FFFFFF;
  z-index: 2;
  line-height: 1;
}

/* Telegram Button - Optical centering for paper plane */
.telegram-btn i {
  margin-right: 2px;
  margin-top: 1px;
}

/* Telegram Button */
.telegram-btn {
  background: linear-gradient(135deg, #26A5E4, #229ED9);
  animation: pulse-glow-blue 2s ease-out infinite;
}

/* Увеличенный значок Telegram внутри круга */
.telegram-btn svg {
  width: 34px;
  height: 34px;
}

/* Значок Telegram — полностью белый без обводки */
.telegram-btn svg,
.telegram-btn svg path {
  fill: #ffffff !important;
  stroke: none !important;
}

/* Form Button */
.form-btn {
  background: linear-gradient(135deg, #9D5EFF, #7B3FD4);
  animation: pulse-glow-purple 2s ease-out infinite;
  animation-delay: 0.5s;
}

/* Phone Button */
.phone-btn {
  background: linear-gradient(135deg, #80FF82, #00D936) !important;
  animation: pulse-glow-green 2s ease-out infinite !important;
  animation-delay: 0s !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Animations */
@keyframes pulse-glow-purple {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(139, 70, 230, 0.7),
                0 0 20px rgba(139, 70, 230, 0.6), 
                0 0 40px rgba(139, 70, 230, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(139, 70, 230, 0),
                0 0 30px rgba(139, 70, 230, 0.4),
                0 0 20px rgba(139, 70, 230, 0.6), 
                0 0 40px rgba(139, 70, 230, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
}

@keyframes pulse-glow-blue {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(38, 165, 228, 0.7),
                0 0 20px rgba(38, 165, 228, 0.6), 
                0 0 40px rgba(38, 165, 228, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(38, 165, 228, 0),
                0 0 30px rgba(38, 165, 228, 0.4),
                0 0 20px rgba(38, 165, 228, 0.6), 
                0 0 40px rgba(38, 165, 228, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
}

@keyframes pulse-glow-green {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7),
                0 0 20px rgba(0, 255, 65, 0.6), 
                0 0 40px rgba(0, 255, 65, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(0, 255, 65, 0),
                0 0 30px rgba(0, 255, 65, 0.4),
                0 0 20px rgba(0, 255, 65, 0.6), 
                0 0 40px rgba(0, 255, 65, 0.4), 
                inset 0 0 10px rgba(255, 255, 255, 0.2);
  }
}

/* Hover Effects */
.floating-btn:hover {
  transform: scale(1.15) !important; /* Override animation transform */
  filter: brightness(1.15);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.telegram-btn:hover {
  box-shadow: 0 0 30px rgba(38, 165, 228, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.form-btn:hover {
  box-shadow: 0 0 30px rgba(139, 70, 230, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.phone-btn:hover {
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Active/Click Effects */
.floating-btn:active {
  transform: scale(0.95) !important;
  transition: 0.1s ease;
}

/* Tooltips */
.floating-btn::after {
  content: attr(aria-label);
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(10, 10, 15, 0.9);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.1);
}

.floating-btn:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Tablet styles (768px - 1024px) */
@media (max-width: 1024px) {
  .floating-buttons {
    right: 24px;
    gap: 16px;
  }
  
  .floating-btn {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }
  
  .floating-btn i {
    font-size: 24px !important;
  }
}

/* Mobile styles (< 768px) */
@media (max-width: 768px) {
  .floating-buttons {
    top: auto;
    bottom: 80px; /* Instead of 50% top */
    right: 16px;
    transform: none;
    gap: 16px;
  }
  
  .floating-btn {
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
  }
  
  .floating-btn i {
    font-size: 22px;
  }
  
  /* Hide tooltips on mobile to avoid clutter */
  .floating-btn::after {
    display: none;
  }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .floating-btn {
    animation: none;
  }
}
