/* Scanner Responsive Styles */
/* .scanner-container {
    padding: 15px;
} */

#scanner {
    background: #000;
    border: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#scanner video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 8px;
}

#scanner canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 8px;
}

/* Toast Styles */
.mobile-toast {
    max-width: 280px !important;
    margin-bottom: 10px !important;
}

.mobile-toast .toast-body {
    padding: 12px 16px !important;
    font-size: 14px;
    border-radius: 8px !important;
}

/* Toast Container untuk mobile - tidak stacking */
@media (max-width: 768px) {
    #toast-container {
        position: fixed !important;
        top: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1055 !important;
        width: auto !important;
    }
    
    #toast-container .toast {
        position: relative !important;
        margin-bottom: 0 !important;
    }
    
    /* Hanya tampilkan toast terbaru di mobile */
    #toast-container .toast:not(:last-child) {
        display: none !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scanner-container {
        padding: 10px;
    }
    
    #scanner {
        max-width: 100%;
        height: 280px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    #scanner {
        height: 240px;
    }
    
    .scanner-controls {
        margin-top: 15px !important;
    }
    
    .scanner-controls .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    #scanner {
        max-width: 560px;
        height: 315px;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    #scanner {
        max-width: 640px;
        height: 360px;
    }
}