Enhanced CSS for better mobile experience: added media queries for various screen sizes, improved touch targets, font sizes, and QR code scaling. Updated index.html with mobile meta tags and icons. Added accessibility features for reduced motion.
288 lines
7.7 KiB
CSS
288 lines
7.7 KiB
CSS
/* Global Styles for QRPay */
|
|
html, body {
|
|
font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
background: linear-gradient(135deg, #2d5a27 0%, #4a7c59 100%);
|
|
min-height: 100vh;
|
|
/* Improve mobile performance */
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
/* Prevent horizontal scrolling */
|
|
overflow-x: hidden;
|
|
/* Better text rendering on mobile */
|
|
text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
}
|
|
|
|
*, *::before, *::after {
|
|
box-sizing: inherit;
|
|
}
|
|
|
|
/* Prevent zoom on input focus for iOS */
|
|
input, select, textarea {
|
|
font-size: 16px;
|
|
}
|
|
|
|
h1:focus {
|
|
outline: none;
|
|
}
|
|
|
|
a, .btn-link {
|
|
color: #4a7c59;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover, .btn-link:hover {
|
|
color: #2d5a27;
|
|
}
|
|
|
|
.btn-primary {
|
|
color: #fff;
|
|
background: linear-gradient(135deg, #2d5a27, #4a7c59);
|
|
border: none;
|
|
border-radius: 8px;
|
|
padding: 12px 24px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
|
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(74, 124, 89, 0.4);
|
|
}
|
|
|
|
.content {
|
|
padding: 0;
|
|
}
|
|
|
|
.valid.modified:not([type=checkbox]) {
|
|
outline: 2px solid #10b981;
|
|
border-color: #10b981;
|
|
}
|
|
|
|
.invalid {
|
|
outline: 2px solid #ef4444;
|
|
border-color: #ef4444;
|
|
}
|
|
|
|
.validation-message {
|
|
color: #ef4444;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
#blazor-error-ui {
|
|
color-scheme: light only;
|
|
background: linear-gradient(135deg, #dc2626, #ef4444);
|
|
bottom: 0;
|
|
box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
|
|
box-sizing: border-box;
|
|
display: none;
|
|
left: 0;
|
|
padding: 1rem 1.25rem;
|
|
position: fixed;
|
|
width: 100%;
|
|
z-index: 1000;
|
|
color: white;
|
|
font-weight: 500;
|
|
border-radius: 12px 12px 0 0;
|
|
}
|
|
|
|
#blazor-error-ui .dismiss {
|
|
cursor: pointer;
|
|
position: absolute;
|
|
right: 0.75rem;
|
|
top: 0.5rem;
|
|
font-size: 1.2rem;
|
|
opacity: 0.8;
|
|
transition: opacity 0.2s;
|
|
min-width: 24px;
|
|
min-height: 24px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
#blazor-error-ui .dismiss:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.blazor-error-boundary {
|
|
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzI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3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA86LjA1NDcgMjYzLjU3NiA4Ni4wNTQ3WiIgZmlsbD0iI0ZGRTUwMCIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9nPjwvc3ZnPg==) no-repeat 1rem/1.8rem, linear-gradient(135deg, #dc2626, #ef4444);
|
|
padding: 1rem 1rem 1rem 3.7rem;
|
|
color: white;
|
|
border-radius: 12px;
|
|
margin: 1rem;
|
|
}
|
|
|
|
.blazor-error-boundary::after {
|
|
content: "An error has occurred."
|
|
}
|
|
|
|
.loading-progress {
|
|
position: absolute;
|
|
display: block;
|
|
width: 8rem;
|
|
height: 8rem;
|
|
inset: 40vh 0 auto 0;
|
|
margin: 0 auto 0 auto;
|
|
}
|
|
|
|
.loading-progress circle {
|
|
fill: none;
|
|
stroke: rgba(255, 255, 255, 0.2);
|
|
stroke-width: 0.6rem;
|
|
transform-origin: 50% 50%;
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.loading-progress circle:last-child {
|
|
stroke: #ffffff;
|
|
stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
|
|
transition: stroke-dasharray 0.05s ease-in-out;
|
|
}
|
|
|
|
.loading-progress-text {
|
|
position: absolute;
|
|
text-align: center;
|
|
font-weight: 600;
|
|
inset: calc(40vh + 3.25rem) 0 auto 0.2rem;
|
|
color: #ffffff;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.loading-progress-text:after {
|
|
content: var(--blazor-load-percentage-text, "Loading QRPay");
|
|
}
|
|
|
|
code {
|
|
color: #4a7c59;
|
|
background: rgba(74, 124, 89, 0.1);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
}
|
|
|
|
/* Form Controls Override */
|
|
.form-floating > .form-control-plaintext::placeholder,
|
|
.form-floating > .form-control::placeholder {
|
|
color: #9ca3af;
|
|
text-align: start;
|
|
}
|
|
|
|
.form-floating > .form-control-plaintext:focus::placeholder,
|
|
.form-floating > .form-control:focus::placeholder {
|
|
text-align: start;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* Custom scrollbar for webkit browsers */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(255, 255, 255, 0.5);
|
|
}
|
|
|
|
/* Mobile-specific improvements */
|
|
@media (max-width: 768px) {
|
|
/* Improve tap highlighting */
|
|
* {
|
|
-webkit-tap-highlight-color: rgba(74, 124, 89, 0.2);
|
|
}
|
|
|
|
/* Better button touch targets */
|
|
button, .btn, input[type="button"], input[type="submit"] {
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
|
|
/* Improve form control touch targets */
|
|
input, textarea, select {
|
|
min-height: 44px;
|
|
}
|
|
|
|
/* Disable iOS zoom on inputs */
|
|
input, textarea, select {
|
|
font-size: 16px !important;
|
|
}
|
|
|
|
/* Loading progress adjustments for mobile */
|
|
.loading-progress {
|
|
width: 6rem;
|
|
height: 6rem;
|
|
inset: 35vh 0 auto 0;
|
|
}
|
|
|
|
.loading-progress-text {
|
|
inset: calc(35vh + 2.5rem) 0 auto 0.2rem;
|
|
font-size: 1rem;
|
|
}
|
|
}
|
|
|
|
/* Very small screens */
|
|
@media (max-width: 480px) {
|
|
body {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.loading-progress {
|
|
width: 5rem;
|
|
height: 5rem;
|
|
inset: 30vh 0 auto 0;
|
|
}
|
|
|
|
.loading-progress-text {
|
|
inset: calc(30vh + 2rem) 0 auto 0.2rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
#blazor-error-ui {
|
|
padding: 0.75rem 1rem;
|
|
font-size: 0.9rem;
|
|
}
|
|
}
|
|
|
|
/* Landscape mobile adjustments */
|
|
@media (max-height: 600px) and (orientation: landscape) {
|
|
.loading-progress {
|
|
inset: 20vh 0 auto 0;
|
|
}
|
|
|
|
.loading-progress-text {
|
|
inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
|
|
}
|
|
}
|
|
|
|
/* High DPI screens */
|
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
/* Sharper rendering for high DPI */
|
|
body {
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
}
|
|
|
|
/* Accessibility improvements */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
* {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
|
|
.loading-progress circle {
|
|
transition: none !important;
|
|
}
|
|
} |