eSPJ/wwwroot/driver/css/scanner.css

128 lines
2.1 KiB
CSS

/* Scanner specific styles */
.scanner-container {
position: relative;
background: #1a1a1a;
border-radius: 8px;
overflow: hidden;
}
.scanner-overlay {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 250px;
height: 120px;
border: 2px dashed rgba(255, 255, 255, 0.7);
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
pointer-events: none;
z-index: 10;
}
.scanner-overlay::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.2),
transparent
);
animation: scan-line 2s linear infinite;
}
@keyframes scan-line {
0% {
left: -100%;
}
100% {
left: 100%;
}
}
/* Video element styling */
#video-preview {
width: 100%;
height: 100%;
object-fit: cover;
transform: scaleX(-1); /* Mirror effect for better UX */
}
/* Canvas overlay for QuaggaJS */
.drawingBuffer {
position: absolute !important;
top: 0 !important;
left: 0 !important;
z-index: 5 !important;
}
/* Button states */
.btn-scanner {
transition: all 0.3s ease;
}
.btn-scanner:active {
transform: scale(0.98);
}
/* Loading animation improvements */
.loading-spinner {
border: 2px solid rgba(255, 255, 255, 0.3);
border-top: 2px solid white;
border-radius: 50%;
width: 32px;
height: 32px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
/* Result card styling */
.scan-result-card {
animation: slideInUp 0.3s ease-out;
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Mobile optimizations */
@media (max-width: 640px) {
.scanner-overlay {
width: 200px;
height: 100px;
}
.scanner-container {
height: 250px !important;
}
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.scanner-container {
background: #0a0a0a;
}
}