/* Fleet-specific styles */

/* Mobile optimizations - Only affects screens smaller than 768px (md breakpoint) */
@media (max-width: 767px) {
  /* Main container padding */
  main > div {
    padding: 1rem !important;
  }
  
  /* Page header */
  main > div > div:first-child {
    margin-bottom: 1rem !important;
  }
  
  main > div > div:first-child h1 {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }
  
  main > div > div:first-child p {
    font-size: 0.875rem !important;
    margin-top: 0.5rem !important;
  }
  
  /* Card padding */
  .card {
    padding: 1rem !important;
    overflow: visible;
  }
  
  /* Header section - stack vertically */
  .fleet-header-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  .fleet-header-section h2 {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
  }
  
  .fleet-actions-section {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }
  
  .fleet-search {
    width: 100% !important;
    font-size: 16px !important; /* Prevents zoom on iOS */
  }
  
  .fleet-add-btn {
    width: 100% !important;
    justify-content: center !important;
    position: relative;
    font-size: 0 !important; /* Hide "Add Vehicle" text */
  }
  
  .fleet-add-btn svg {
    font-size: 1.25rem !important;
    margin-right: 0.5rem !important;
  }
  
  .fleet-add-btn::after {
    content: "Add" !important;
    font-size: 0.875rem !important;
  }
  
  /* Filter section - stack vertically */
  .fleet-filter-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  
  .fleet-filter-controls {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  
  .fleet-filter-controls select {
    width: 10rem !important;
  }
  
  /* Table container with proper scrolling */
  .fleet-table-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    width: 100%;
    overflow-x: auto !important;
    overflow-y: visible;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Table styling for mobile */
  .table-cell {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
    min-width: 80px !important;
  }
  
  .table-header {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
    min-width: 80px !important;
  }
  
  /* Action buttons in table - make them more compact */
  .table-cell .flex {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
  }
  
  .table-cell button {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
  }
  
  /* Better touch targets for buttons */
  button, a.btn-primary, a.btn-secondary {
    min-height: 44px !important;
    font-size: 0.875rem !important;
  }
  
  /* Pagination - stack vertically */
  .fleet-pagination {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
  }
  
  .fleet-pagination-info {
    font-size: 0.75rem !important;
    text-align: center !important;
  }
  
  .fleet-pagination-controls {
    gap: 0.5rem !important;
  }
  
  .fleet-pagination-controls button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
  }
  
  #paginationNumbers {
    gap: 0.25rem !important;
  }
  
  #paginationNumbers button {
    min-width: 36px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
  }
}

