/**
 * Mobile UX Optimizations for Garage-Sale Mode
 * Phase 1: Header cleanup, Hero optimization
 */

/* ========================================
   MOBILE HEADER CLEANUP
   ======================================== */

@media (max-width: 768px) {
  /* Reduce header height */
  header,
  .site-header,
  #header,
  .header {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  /* Shrink logo */
  .site-logo img,
  .logo img,
  #logo img,
  .header-logo img {
    max-height: 36px !important;
    width: auto !important;
  }

  /* Compact site branding */
  .site-branding,
  .block-system-branding-block {
    padding: 0 !important;
  }

  /* Ensure hamburger menu is visible and positioned */
  .mobile-menu-toggle,
  .menu-toggle,
  .hamburger-menu {
    z-index: 1000;
  }
}

/* ========================================
   MOBILE HERO OPTIMIZATION
   ======================================== */

@media (max-width: 768px) {
  /* Hero section - more compact on mobile */
  .free-appraisal-cta {
    padding: 1.5rem 1rem !important;
    margin: 1rem !important;
    border-radius: 12px !important;
  }

  /* Shorter headline */
  .free-appraisal-cta h1 {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.75rem !important;
  }

  /* Hide or compact tagline */
  .free-appraisal-cta [style*="inline-flex"] {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
    margin-bottom: 1rem !important;
  }

  /* Compact feature list */
  .free-appraisal-cta ul {
    margin-bottom: 1.25rem !important;
    gap: 0.5rem 1rem !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .free-appraisal-cta li {
    font-size: 0.9rem !important;
  }

  /* CTA Button - full width on mobile */
  .free-appraisal-cta a[style*="inline-block"] {
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    font-size: 1.1rem !important;
    box-sizing: border-box !important;
  }

  /* Subtext */
  .free-appraisal-cta p[style*="0.8rem"] {
    font-size: 0.75rem !important;
    margin-top: 0.5rem !important;
  }

  /* Hide secondary links on mobile */
  .free-appraisal-cta p:last-child {
    display: none !important;
  }
}

/* ========================================
   MOBILE-SPECIFIC CTA ENHANCEMENT
   ======================================== */

@media (max-width: 768px) {
  /* Add Quick Scan as secondary CTA on homepage hero */
  .free-appraisal-cta::after {
    content: none; /* Will be added via JS */
  }
}

/* ========================================
   GENERAL MOBILE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
  /* Improve tap targets */
  button,
  .btn,
  a.btn,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Better spacing */
  .content,
  .main-content,
  .region-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Faster perceived performance */
  * {
    -webkit-tap-highlight-color: transparent;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
}

/* ========================================
   HIDE DESKTOP-ONLY ELEMENTS ON MOBILE
   ======================================== */

@media (max-width: 768px) {
  /* Hide elements that clutter mobile view */
  .desktop-only,
  .hide-mobile {
    display: none !important;
  }

  /* Show mobile-only elements */
  .mobile-only,
  .show-mobile {
    display: block !important;
  }
}

/* ========================================
   QUICK SCAN HOMEPAGE CTA
   ======================================== */

/* Mobile-only Quick Scan CTA below hero */
.quickscan-homepage-cta {
  display: none;
}

@media (max-width: 768px) {
  .quickscan-homepage-cta {
    display: block;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 1.25rem 1rem;
    margin: 0 1rem 1rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(26, 54, 93, 0.3);
  }

  .quickscan-homepage-cta .cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .quickscan-homepage-cta .cta-text {
    text-align: left;
  }

  .quickscan-homepage-cta .cta-title {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .quickscan-homepage-cta .cta-subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
  }

  .quickscan-homepage-cta .cta-button {
    background: white;
    color: #1a365d;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .quickscan-homepage-cta .cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
  }
}
