/* MAKZR Mobile Critical CSS - Only loads on mobile devices */
/* Lightweight, optimized styles for mobile performance */

@media (max-width: 768px) {
  /* Reset and base styles */
  * {
    box-sizing: border-box;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Layout utilities */
  .container { max-width: 100%; padding: 0 1rem; }
  .flex { display: flex; }
  .grid { display: grid; }
  .hidden { display: none; }
  .block { display: block; }
  
  /* Spacing */
  .p-4 { padding: 1rem; }
  .p-6 { padding: 1.5rem; }
  .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
  .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
  .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
  .px-4 { padding-left: 1rem; padding-right: 1rem; }
  .mb-2 { margin-bottom: 0.5rem; }
  .mb-4 { margin-bottom: 1rem; }
  .mb-6 { margin-bottom: 1.5rem; }
  
  /* Typography */
  .text-sm { font-size: 0.875rem; }
  .text-base { font-size: 1rem; }
  .text-lg { font-size: 1.125rem; }
  .text-xl { font-size: 1.25rem; }
  .text-2xl { font-size: 1.5rem; }
  .text-3xl { font-size: 1.875rem; }
  .font-medium { font-weight: 500; }
  .font-semibold { font-weight: 600; }
  .font-bold { font-weight: 700; }
  
  /* Colors */
  .text-gray-600 { color: #4b5563; }
  .text-gray-700 { color: #374151; }
  .text-gray-900 { color: #111827; }
  .text-blue-600 { color: #2563eb; }
  .text-white { color: #ffffff; }
  .bg-white { background-color: #ffffff; }
  .bg-blue-600 { background-color: #2563eb; }
  .bg-gray-50 { background-color: #f9fafb; }
  
  /* Borders and radius */
  .border { border: 1px solid #d1d5db; }
  .border-gray-300 { border-color: #d1d5db; }
  .rounded-lg { border-radius: 0.5rem; }
  .rounded-xl { border-radius: 0.75rem; }
  
  /* Shadows */
  .shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
  
  /* Interactive elements */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  .btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
  }
  
  .btn-primary:hover,
  .btn-primary:active {
    background-color: #1d4ed8;
  }
  
  /* Form elements */
  input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 16px; /* Prevents zoom on iOS */
    line-height: 1.5;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out;
  }
  
  input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }
  
  /* Grid layouts */
  .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .gap-4 { gap: 1rem; }
  .gap-6 { gap: 1.5rem; }
  
  /* Flexbox utilities */
  .items-center { align-items: center; }
  .justify-center { justify-content: center; }
  .justify-between { justify-content: space-between; }
  .space-y-4 > * + * { margin-top: 1rem; }
  .space-y-6 > * + * { margin-top: 1.5rem; }
  
  /* Mobile-specific optimizations */
  .mobile-optimized {
    contain: layout style paint;
    will-change: auto;
  }
  
  /* Hero sections */
  .hero-mobile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 3rem 1rem;
    text-align: center;
  }
  
  /* Navigation */
  .nav-mobile {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
  }
  
  /* Mobile menu */
  .mobile-menu {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 1rem;
  }
  
  .mobile-menu a {
    display: block;
    padding: 0.75rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
  }
  
  .mobile-menu a:hover,
  .mobile-menu a:active {
    background-color: #eff6ff;
    color: #2563eb;
  }
  
  /* Loading states */
  .loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
  }
  
  @keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }
  
  /* Performance optimizations */
  .gpu-accelerated {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  .smooth-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
  
  /* Touch optimizations */
  .touch-target {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Image optimizations */
  img {
    max-width: 100%;
    height: auto;
    loading: lazy;
    decoding: async;
  }
  
  /* Reduce motion for accessibility */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  
  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    body {
      background-color: #1f2937;
      color: #f9fafb;
    }
    
    .bg-white {
      background-color: #374151;
    }
    
    .text-gray-900 {
      color: #f9fafb;
    }
    
    .border-gray-300 {
      border-color: #4b5563;
    }
  }
  
  /* Critical path optimizations */
  .critical-content {
    contain: layout style paint;
    content-visibility: auto;
    contain-intrinsic-size: 200px;
  }
  
  /* Utility classes for mobile */
  .w-full { width: 100%; }
  .h-auto { height: auto; }
  .text-center { text-align: center; }
  .relative { position: relative; }
  .absolute { position: absolute; }
  .fixed { position: fixed; }
  .top-0 { top: 0; }
  .left-0 { left: 0; }
  .right-0 { right: 0; }
  .bottom-0 { bottom: 0; }
  .z-10 { z-index: 10; }
  .z-50 { z-index: 50; }
  
  /* Mobile-first responsive utilities */
  .mobile-only { display: block; }
  .desktop-only { display: none; }
}
