227 lines
4.5 KiB
CSS
227 lines
4.5 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
/* ============================================
|
|
PWA & iOS Safe Area Support
|
|
============================================ */
|
|
|
|
/* Ensure the entire app respects iOS safe areas */
|
|
:root {
|
|
/* Define safe area insets for iOS devices */
|
|
--safe-area-inset-top: env(safe-area-inset-top, 0px);
|
|
--safe-area-inset-right: env(safe-area-inset-right, 0px);
|
|
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
|
|
--safe-area-inset-left: env(safe-area-inset-left, 0px);
|
|
}
|
|
|
|
/* PWA-specific styles */
|
|
@media all and (display-mode: standalone) {
|
|
/* Remove system tap highlight on iOS PWA */
|
|
* {
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
/* Prevent pull-to-refresh on iOS */
|
|
body {
|
|
overscroll-behavior-y: contain;
|
|
}
|
|
|
|
/* Improve iOS PWA scrolling performance */
|
|
html {
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
}
|
|
|
|
/* iOS-specific optimizations */
|
|
@supports (-webkit-touch-callout: none) {
|
|
/* Disable callout on iOS when long-pressing */
|
|
* {
|
|
-webkit-touch-callout: none;
|
|
}
|
|
|
|
/* Allow callout on text content */
|
|
p, span, div[contenteditable="true"] {
|
|
-webkit-touch-callout: default;
|
|
}
|
|
|
|
/* Smooth momentum scrolling on iOS */
|
|
.scrollable-content {
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
/* Fix iOS input zoom issue */
|
|
input, textarea, select {
|
|
font-size: 16px !important;
|
|
}
|
|
}
|
|
|
|
/* Touch-optimized tap targets (minimum 44x44px for iOS) */
|
|
@media (pointer: coarse) {
|
|
button,
|
|
a,
|
|
.MuiIconButton-root,
|
|
.MuiButton-root,
|
|
.MuiChip-root.MuiChip-clickable {
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
|
|
/* Bottom navigation touch targets */
|
|
.MuiBottomNavigationAction-root {
|
|
min-height: 56px;
|
|
}
|
|
}
|
|
|
|
/* Prevent iOS double-tap zoom on buttons */
|
|
button,
|
|
input[type="button"],
|
|
input[type="submit"] {
|
|
touch-action: manipulation;
|
|
}
|
|
|
|
/* iOS status bar color adaptation */
|
|
@media (prefers-color-scheme: dark) {
|
|
html {
|
|
background-color: #1e1e1e;
|
|
}
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
html {
|
|
background-color: #ffffff;
|
|
}
|
|
}
|
|
|
|
/* Enhanced search responsiveness styles */
|
|
.search-input-responsive {
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
|
|
.search-input-responsive:focus-within {
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
/* Mobile-friendly search results */
|
|
@media (max-width: 768px) {
|
|
.search-results-grid {
|
|
gap: 1rem !important;
|
|
}
|
|
|
|
.search-card {
|
|
padding: 0.75rem !important;
|
|
}
|
|
|
|
.search-chip {
|
|
font-size: 0.7rem !important;
|
|
height: 18px !important;
|
|
max-width: 100px;
|
|
}
|
|
}
|
|
|
|
/* Prevent text overflow in search components */
|
|
.search-result-card {
|
|
overflow: hidden;
|
|
}
|
|
|
|
.search-result-card .MuiCardContent-root {
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Ensure proper flex behavior for narrow windows */
|
|
@media (max-width: 1024px) {
|
|
/* Prevent horizontal overflow in search results */
|
|
.search-result-card {
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Ensure chips wrap properly */
|
|
.MuiChip-root {
|
|
flex-shrink: 0;
|
|
margin: 2px;
|
|
}
|
|
|
|
/* Prevent button groups from overflowing */
|
|
.MuiToggleButtonGroup-root {
|
|
flex-wrap: wrap;
|
|
gap: 4px;
|
|
}
|
|
|
|
/* Ensure search stats wrap on narrow screens */
|
|
.search-stats-container {
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
}
|
|
|
|
/* Extra small screens */
|
|
@media (max-width: 480px) {
|
|
/* Stack search mode buttons vertically */
|
|
.MuiToggleButtonGroup-root {
|
|
flex-direction: column;
|
|
width: 100%;
|
|
}
|
|
|
|
.MuiToggleButtonGroup-root .MuiToggleButton-root {
|
|
width: 100%;
|
|
}
|
|
|
|
/* Reduce chip sizes further */
|
|
.search-chip {
|
|
font-size: 0.65rem !important;
|
|
height: 16px !important;
|
|
padding: 0 6px !important;
|
|
}
|
|
|
|
/* Stack action buttons vertically in cards */
|
|
.search-card-actions {
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
}
|
|
|
|
/* Touch-friendly interactive elements */
|
|
@media (pointer: coarse) {
|
|
.search-suggestion-chip {
|
|
min-height: 32px;
|
|
padding: 8px 12px;
|
|
}
|
|
|
|
.search-filter-button {
|
|
min-height: 40px;
|
|
min-width: 40px;
|
|
}
|
|
}
|
|
|
|
/* Smooth animations for search loading states */
|
|
.search-loading-fade {
|
|
opacity: 0;
|
|
animation: searchFadeIn 0.3s ease-in-out forwards;
|
|
}
|
|
|
|
@keyframes searchFadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Enhanced hover states for better UX */
|
|
.search-result-card {
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.search-result-card:hover {
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* Improved focus states for accessibility */
|
|
.search-focusable:focus-visible {
|
|
outline: 2px solid #6366f1;
|
|
outline-offset: 2px;
|
|
} |