/** * Responsive design utilities for asset management module * These classes complement Tailwind CSS for specific responsive needs */ /* Mobile-first responsive breakpoints */ :root { --mobile-breakpoint: 768px; --tablet-breakpoint: 1024px; --desktop-breakpoint: 1280px; } /* Focus management for better accessibility */ .focus-visible-only:focus { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; } .focus-visible-only:focus:not(:focus-visible) { outline: none; } /* Screen reader only content */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } /* Skip to content link for keyboard navigation */ .skip-link { position: absolute; top: -40px; left: 6px; background: hsl(var(--background)); color: hsl(var(--foreground)); padding: 8px; text-decoration: none; border-radius: 4px; border: 2px solid hsl(var(--ring)); z-index: 1000; } .skip-link:focus { top: 6px; } /* High contrast mode support */ @media (prefers-contrast: high) { .asset-card { border-width: 2px; } .badge { border-width: 1px; border-style: solid; } } /* Reduced motion support */ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* Mobile-specific styles */ @media (max-width: 767px) { /* Ensure touch targets are at least 44px */ .touch-target { min-height: 44px; min-width: 44px; } /* Mobile table alternatives */ .mobile-table-card { display: block; border: 1px solid hsl(var(--border)); border-radius: 8px; padding: 16px; margin-bottom: 12px; background: hsl(var(--card)); } .mobile-table-card .table-cell { display: block; padding: 4px 0; } .mobile-table-card .table-cell:not(:last-child) { border-bottom: 1px solid hsl(var(--border)); padding-bottom: 8px; margin-bottom: 8px; } /* Mobile form improvements */ .mobile-form-field { margin-bottom: 20px; } .mobile-form-actions { position: sticky; bottom: 0; background: hsl(var(--background)); padding: 16px; border-top: 1px solid hsl(var(--border)); margin: 0 -16px -16px -16px; } } /* Tablet-specific styles */ @media (min-width: 768px) and (max-width: 1023px) { .tablet-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; } .tablet-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } } /* Desktop-specific styles */ @media (min-width: 1024px) { .desktop-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; } .desktop-sidebar { position: sticky; top: 20px; height: fit-content; } } /* Print styles */ @media print { .no-print { display: none !important; } .print-break-before { page-break-before: always; } .print-break-after { page-break-after: always; } /* Ensure good contrast in print */ * { color: black !important; background: white !important; } .asset-table { border-collapse: collapse; } .asset-table th, .asset-table td { border: 1px solid black; padding: 8px; } } /* Dark mode adjustments */ @media (prefers-color-scheme: dark) { .dark-mode-border { border-color: hsl(var(--border)); } .dark-mode-text { color: hsl(var(--foreground)); } } /* Animation utilities for better UX */ .fade-in { animation: fadeIn 0.2s ease-in-out; } .slide-up { animation: slideUp 0.3s ease-out; } .scale-in { animation: scaleIn 0.2s ease-out; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } } @keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } } /* Loading states */ .loading-skeleton { background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--muted-foreground) / 0.1) 50%, hsl(var(--muted)) 75% ); background-size: 200% 100%; animation: loading 1.5s infinite; } @keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* Focus indicators for better accessibility */ .focus-ring:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; } /* Ensure minimum touch target size on mobile */ @media (max-width: 767px) { button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"] { min-height: 44px; min-width: 44px; } }