/**
 * Mobile Floating Action Button (FAB) for Quick Scan
 * Only visible on mobile devices
 */

/* Hide by default on desktop */
.quickscan-fab-container {
  display: none;
}

/* Mobile only - Show FAB */
@media (max-width: 768px) {
  .quickscan-fab-container {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
  }

  /* Hide FAB on quick scan pages */
  .quickscan-page .quickscan-fab-container,
  .quickscan-result-page .quickscan-fab-container {
    display: none !important;
  }

  .quickscan-fab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d4af37 0%, #b8931f 100%);
    color: white;
    text-decoration: none;
    padding: 14px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4),
                0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: fabPulse 3s ease-in-out infinite;
  }

  .quickscan-fab:hover,
  .quickscan-fab:active {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.5),
                0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
  }

  .fab-icon {
    font-size: 1.2rem;
  }

  .fab-label {
    white-space: nowrap;
  }

  /* Pulse animation to draw attention */
  @keyframes fabPulse {
    0%, 100% {
      box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4),
                  0 2px 10px rgba(0, 0, 0, 0.15);
    }
    50% {
      box-shadow: 0 4px 25px rgba(212, 175, 55, 0.6),
                  0 2px 15px rgba(0, 0, 0, 0.2);
    }
  }

  /* Tooltip */
  .fab-tooltip {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #1a202c;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
  }

  .fab-tooltip span {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
  }

  .fab-tooltip small {
    display: block;
    font-size: 0.75rem;
    color: #a0aec0;
    margin-top: 2px;
  }

  .fab-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    border: 8px solid transparent;
    border-top-color: #1a202c;
  }

  /* Show tooltip on first visit */
  .quickscan-fab-container.show-tooltip .fab-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Very small screens - compact FAB */
@media (max-width: 380px) {
  .quickscan-fab-container {
    bottom: 15px;
    right: 15px;
  }

  .quickscan-fab {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .fab-icon {
    font-size: 1.1rem;
  }
}

/* Landscape mode on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .quickscan-fab-container {
    bottom: 10px;
    right: 10px;
  }

  .quickscan-fab {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}
