/* Mobile-optimized barcode scanner styles */

.barcode-scanner-container {
    width: 100%;
    margin-bottom: 16px;
}

.barcode-video-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .barcode-video-wrapper {
        height: 400px; /* Taller on mobile for better scanning */
    }
}

.barcode-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.barcode-target-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 180px;
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 768px) {
    .barcode-target-frame {
        width: 90%;
        max-width: 300px;
        height: 200px;
    }
}

.target-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid #38BAF5;
}

.target-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 8px;
}

.target-corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 8px;
}

.target-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 8px;
}

.target-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 8px;
}

.barcode-camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 20;
    border-radius: 12px;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .barcode-scanner-container {
        margin-bottom: 20px;
    }
    
    /* Larger input field for mobile */
    .barcode-scanner-container .mud-input-root {
        min-height: 56px !important;
        font-size: 18px !important; /* Prevents zoom on iOS */
    }
    
    .barcode-scanner-container .mud-input {
        font-size: 18px !important;
        padding: 16px !important;
    }
}

