/* Axencia.co — Mobile Bottom Bar: Call | Scroll | WhatsApp */

/* Desktop: bar is transparent wrapper, children keep original fixed positions */
.mobile-bottom-bar {
  position: static;
  pointer-events: none;
}

.mobile-bottom-bar > * {
  pointer-events: auto;
}

/* Mobile: unified bottom bar */
@media (max-width: 768px) {
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px 24px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.45s,
                transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-bottom-bar.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-bottom-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.97) 0%, rgba(15, 23, 42, 0.92) 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-top: 1px solid rgba(59, 130, 246, 0.25);
    box-shadow: 
      0 -8px 32px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    z-index: -1;
  }

  /* Use display: contents so quick-actions children flow in bar; order for [Call][Scroll][WhatsApp] */
  .mobile-bottom-bar .quick-actions {
    display: contents;
  }

  .mobile-bottom-bar .quick-actions .quick-action-btn:first-child { order: 1; }
  .mobile-bottom-bar .scroll-to-top { order: 2; }
  .mobile-bottom-bar .quick-actions .quick-action-btn:last-child { order: 3; }

  .mobile-bottom-bar .scroll-to-top {
    position: static;
    bottom: auto;
    left: auto;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
  }

  .mobile-bottom-bar .scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }

  .mobile-bottom-bar .scroll-to-top-btn {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .mobile-bottom-bar .scroll-to-top-btn::after {
    border-radius: 15px;
  }

  /* Compact quick action buttons for mobile — interactive */
  .mobile-bottom-bar .quick-action-btn {
    padding: 12px 18px;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .mobile-bottom-bar .quick-action-btn:active {
    transform: scale(0.95);
    background: rgba(59, 130, 246, 0.25);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.2);
  }

  .mobile-bottom-bar .scroll-to-top:active .scroll-to-top-btn {
    transform: scale(0.94);
  }

  /* Scroll-only (thank-you, 404): center the scroll button, always visible */
  .mobile-bottom-bar.scroll-only {
    justify-content: center;
    padding: 16px 24px 28px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .mobile-bottom-bar.scroll-only .scroll-to-top {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}
