/* Dashboard Mobile Enhancements */

/* Mobile sidebar smooth scrolling */
@media (max-width: 1023px) {
  [data-mobile-menu-target="sidebar"] {
    -webkit-overflow-scrolling: touch;
    height: 100vh;
  }

  /* Ensure overlay appears above content */
  [data-mobile-menu-target="overlay"] {
    transition: opacity 0.3s ease-in-out;
  }
}

/* Mobile touch targets */
@media (max-width: 768px) {
  /* Increase touch targets for mobile */
  button, 
  .btn,
  [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Better spacing for mobile forms */
  .space-y-3 > * + * {
    margin-top: 1rem;
  }
  
  /* Ensure text is readable on mobile */
  .text-sm {
    font-size: 0.875rem;
  }
}

/* Improve focus states for better accessibility */
button:focus,
[role="button"]:focus,
a:focus {
  outline: 2px solid theme('colors.pink.500');
  outline-offset: 2px;
}

/* Custom scrollbar for sidebar */
.overflow-y-auto::-webkit-scrollbar {
  width: 4px;
}

.overflow-y-auto::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

.overflow-y-auto::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Mobile-first responsive text scaling */
@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
}

/* Ensure buttons are properly sized on mobile */
@media (max-width: 640px) {
  .btn, 
  .rounded-md {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* Improve mobile header layout */
@media (max-width: 640px) {
  .bg-gradient-to-r {
    padding: 1rem;
  }

  .bg-gradient-to-r h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }
}

/* Stat card responsive improvements */
@media (max-width: 768px) {
  /* Make stat numbers more readable on mobile */
  .text-3xl {
    font-size: 1.75rem;
  }

  .text-xl {
    font-size: 1.125rem;
  }
}

/* Table responsive improvements */
@media (max-width: 640px) {
  /* Reduce table cell padding on mobile */
  table td,
  table th {
    white-space: nowrap;
  }

  /* Ensure tables can scroll smoothly */
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* Custom scrollbar for tables on mobile */
  .overflow-x-auto::-webkit-scrollbar {
    height: 4px;
  }

  .overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
  }

  .overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
  }
}

/* Improve mobile navigation */
@media (max-width: 1023px) {
  /* Make navigation links more touch-friendly */
  nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

/* Better mobile header spacing */
@media (max-width: 640px) {
  header .text-xl {
    font-size: 1.125rem;
  }
}