/* ===== BUTTONS STYLES ===== */

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: clamp(0.8rem, 3vw, 1.5rem);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 0;
  width: 100%;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.8rem);
  padding: clamp(0.8rem, 3vw, 1.2rem) clamp(1.2rem, 4vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  font-size: clamp(0.8rem, 2.5vw, 0.95rem);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--primary);
  min-width: 0;
  flex: 1;
  max-width: 300px;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
  will-change: transform, box-shadow, background;
}

.action-btn:hover {
  transform: translateY(-3px) scale(1.02);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.action-btn:active {
  transform: translateY(-1px) scale(0.98);
  transition: all 0.15s ease;
}

.telegram-btn:hover {
  border-color: #0088cc;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.15), rgba(0, 136, 204, 0.05));
  box-shadow: 0 12px 35px rgba(0, 136, 204, 0.3), 0 0 0 1px rgba(0, 136, 204, 0.2);
}

.whatsapp-btn:hover {
  border-color: #25D366;
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.05));
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.3), 0 0 0 1px rgba(37, 211, 102, 0.2);
}

.feedback-btn:hover {
  border-color: var(--accent);
  background: rgba(0, 209, 178, 0.1);
}

.btn-icon {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  opacity: 0.9;
  width: clamp(1rem, 2.5vw, 1.2rem);
  height: clamp(1rem, 2.5vw, 1.2rem);
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateZ(0);
  will-change: transform, opacity;
}

.action-btn:hover .btn-icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.telegram-btn:hover .btn-icon {
  color: #0088cc;
  transform: scale(1.15) rotate(-3deg);
}

.whatsapp-btn:hover .btn-icon {
  color: #25D366;
  transform: scale(1.15) rotate(3deg);
}

.btn-text {
  font-size: clamp(0.8rem, 2.2vw, 0.9rem);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Language Switcher Buttons */
.lang-bar {
  position: fixed;
  top: 8px;                /* fallback */
  left: 8px;               /* fallback */
  top: calc(8px + env(safe-area-inset-top));
  left: calc(8px + env(safe-area-inset-left));
  display: flex;
  gap: 0.3rem;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 9999;
}

.lang-btn {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.7;
  user-select: none;
}

.lang-btn:hover { 
  opacity: 1;
  transform: scale(1.1);
}

.lang-btn.active, .lang-btn[aria-pressed="true"] {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hide old select if it ever appears */
.lang-select { display: none; }

/* Form Buttons */
.btn-primary,
.btn-secondary {
  padding: clamp(0.7rem, 2.5vw, 0.8rem) clamp(1.2rem, 3.5vw, 1.5rem);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.2vw, 0.9rem);
  cursor: pointer;
  transition: all 0.3s;
  min-height: 44px; /* Touch target size */
  flex: 1;
  min-width: 120px;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Payment Method Buttons */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.8rem, 2vw, 1.2rem);
  align-items: stretch;
  justify-items: center;
  margin-top: 0.5rem;
  width: 100%;
  flex: 1;
  min-width: 0; /* Allow grid to shrink */
  overflow: hidden; /* Prevent overflow */
  padding: 0.2rem;
}

.payment-icon {
  width: 100%;
  height: clamp(32px, 7vw, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 1.6; /* Maintain card-like proportions */
}

.payment-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.payment-icon svg {
  width: 100%;
  height: 100%;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.payment-icon:hover svg {
  opacity: 1;
}

/* ===== ADVANCED ANIMATIONS ===== */

/* Pulse animation for attention */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes pulse-telegram {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 136, 204, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 136, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 136, 204, 0);
  }
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* Ripple effect */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2px);
  }
}

/* Icon bounce animation */
@keyframes icon-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-3px) scale(1.1);
  }
  60% {
    transform: translateY(-1px) scale(1.05);
  }
}

/* Apply pulse animation to buttons */
.action-btn {
  animation: float 6s ease-in-out infinite;
}

.telegram-btn {
  animation: float 6s ease-in-out infinite, pulse-telegram 3s ease-in-out infinite;
  animation-delay: 0s, 1s;
}

.whatsapp-btn {
  animation: float 6s ease-in-out infinite, pulse-whatsapp 3s ease-in-out infinite;
  animation-delay: 0s, 2s;
}

/* Ripple effect on click */
.action-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
  z-index: 0;
}

.action-btn:active::before {
  width: 300px;
  height: 300px;
  animation: ripple 0.6s ease-out;
}

/* Ensure text and icon stay above ripple */
.btn-icon,
.btn-text {
  position: relative;
  z-index: 1;
}

/* Subtle glow effect */
.action-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.action-btn:hover::after {
  opacity: 1;
}

/* Focus states for accessibility */
.action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.action-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

/* Click animation class */
.action-btn.clicked {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

/* Enhanced ripple animation */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Icon bounce animation for hover */
@keyframes icon-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) scale(1);
  }
  40% {
    transform: translateY(-3px) scale(1.1);
  }
  60% {
    transform: translateY(-1px) scale(1.05);
  }
}

/* Performance optimizations */
.action-btn {
  contain: layout style paint;
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Smooth transitions for all interactive states */
.action-btn,
.action-btn * {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced focus states for better accessibility */
.action-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* Loading state animation */
.action-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.action-btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  .action-btn,
  .btn-icon {
    animation: none !important;
    transition: none !important;
  }
  
  .action-btn:hover {
    transform: none !important;
  }
  
  .action-btn:hover .btn-icon {
    transform: none !important;
  }
  
  .action-btn::before,
  .action-btn::after {
    display: none !important;
  }
}
