/*
 * MOBILE CALL TO ACTION - Floating Button
 * Premium conversion-optimized mobile CTA
 */

/* ===== FLOATING FAQ BUTTON (Mobile Only) ===== */
.mobile-faq-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(245, 158, 11, 0.4),
    0 0 0 0 rgba(245, 158, 11, 0.7);
  cursor: pointer;
  z-index: 999;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse-ring 2s infinite;
  text-decoration: none;
  border: none;
  font-family: inherit;
  font-weight: 600;
}

.mobile-faq-fab svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-faq-fab:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 
    0 6px 30px rgba(245, 158, 11, 0.6),
    0 0 0 10px rgba(245, 158, 11, 0.2);
}

.mobile-faq-fab:active {
  transform: scale(0.95);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 
      0 4px 20px rgba(245, 158, 11, 0.4),
      0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  50% {
    box-shadow: 
      0 4px 20px rgba(245, 158, 11, 0.4),
      0 0 0 15px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 
      0 4px 20px rgba(245, 158, 11, 0.4),
      0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .mobile-faq-fab {
    display: none;
  }
}

/* ===== FLOATING CALL BUTTON (DISABLED/HIDDEN) ===== */
.mobile-call-fab {
  display: none !important;
}

.mobile-call-fab svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-call-fab:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 
    0 6px 30px rgba(16, 185, 129, 0.6),
    0 0 0 10px rgba(16, 185, 129, 0.2);
}

.mobile-call-fab:active {
  transform: scale(0.95);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 
      0 4px 20px rgba(16, 185, 129, 0.4),
      0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 
      0 4px 20px rgba(16, 185, 129, 0.4),
      0 0 0 15px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 
      0 4px 20px rgba(16, 185, 129, 0.4),
      0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Hide on desktop */
@media (min-width: 769px) {
  .mobile-call-fab {
    display: none;
  }
}

/* ===== WHATSAPP BUTTON (DISABLED/HIDDEN) ===== */
.mobile-whatsapp-fab {
  display: none !important;
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
  position: fixed;
  bottom: 170px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 998;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-2px);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

@media (min-width: 769px) {
  .scroll-to-top {
    bottom: 20px;
  }
}

/* ===== FAB LABELS (Tooltip on hover) ===== */
.mobile-faq-fab::before,
.mobile-call-fab::before,
.mobile-whatsapp-fab::before {
  content: attr(data-label);
  position: absolute;
  right: 70px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-faq-fab:hover::before,
.mobile-call-fab:hover::before,
.mobile-whatsapp-fab:hover::before {
  opacity: 1;
}

/* ===== BADGE ON FAB ===== */
.mobile-call-fab .badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid white;
  animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ===== MOBILE BOTTOM BAR (Alternative) ===== */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  z-index: 997;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.mobile-bottom-bar.visible {
  transform: translateY(0);
}

[data-theme="dark"] .mobile-bottom-bar {
  background: rgba(17, 24, 39, 0.95);
  border-top-color: rgba(255, 255, 255, 0.1);
}

.mobile-bottom-bar .btn {
  flex: 1;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.mobile-bottom-bar .btn-call {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.mobile-bottom-bar .btn-call:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}

.mobile-bottom-bar .btn-message {
  background: white;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
}

[data-theme="dark"] .mobile-bottom-bar .btn-message {
  background: var(--bg-elevated);
  color: var(--primary-blue);
}

.mobile-bottom-bar .btn-message:active {
  transform: scale(0.97);
  background: rgba(37, 99, 235, 0.1);
}

@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none;
  }
}

/* ===== SAFE AREA SUPPORT ===== */
@supports (padding: max(0px)) {
  .mobile-call-fab {
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
  }
  
  .mobile-whatsapp-fab {
    bottom: max(90px, calc(env(safe-area-inset-bottom, 0px) + 90px));
  }
  
  .scroll-to-top {
    bottom: max(170px, calc(env(safe-area-inset-bottom, 0px) + 170px));
  }
  
  .mobile-bottom-bar {
    padding-bottom: max(0.75rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
  }
}

/* ===== ANIMATION PREFERENCES ===== */
@media (prefers-reduced-motion: reduce) {
  .mobile-call-fab,
  .mobile-whatsapp-fab,
  .scroll-to-top,
  .mobile-bottom-bar {
    animation: none;
    transition: none;
  }
}

/* ===== TOUCH FEEDBACK ===== */
.mobile-call-fab:active,
.mobile-whatsapp-fab:active,
.scroll-to-top:active {
  transition: transform 0.1s ease;
}

/* ===== HIDE WHEN TYPING (Keyboard Open) ===== */
@media (max-width: 768px) and (max-height: 500px) {
  .mobile-call-fab,
  .mobile-whatsapp-fab,
  .scroll-to-top {
    display: none;
  }
}
