.mlhdn-qr-scanner-section {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #f9f9f9;
}

.mlhdn-qr-scanner-section h3 {
    margin-top: 0;
    color: #333;
}

.mlhdn-qr-scanner-section .description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

#mlhdn-qr-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mlhdn-qr-modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    position: relative;
}

.mlhdn-qr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e5e5;
}

.mlhdn-qr-modal-header h4 {
    margin: 0;
    color: #333;
}

#mlhdn-close-qr-scanner {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mlhdn-qr-video {
    border: 2px solid #0073aa;
    border-radius: 5px;
    max-width: 100%;
    height: auto;
}

.mlhdn-manual-input {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.mlhdn-manual-input h5 {
    margin-top: 0;
    color: #333;
}

#mlhdn-manual-qr-data {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 10px;
    font-family: monospace;
    font-size: 12px;
    resize: vertical;
}

#mlhdn-process-manual-qr {
    margin-top: 10px;
}

.mlhdn-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.mlhdn-loading-content {
    background: white;
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mlhdn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: mlhdn-spin 1s linear infinite;
}

@keyframes mlhdn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.mlhdn-qr-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 10001;
    max-width: 300px;
    word-wrap: break-word;
}

.mlhdn-qr-success {
    background: #00a32a;
}

.mlhdn-qr-error {
    background: #dc3232;
}

.mlhdn-qr-warning {
    background: #dba617;
}

.mlhdn-qr-validation {
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 12px;
}

.mlhdn-qr-validation.mlhdn-qr-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mlhdn-qr-validation.mlhdn-qr-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mlhdn-qr-validation.mlhdn-qr-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.mlhdn-admin-qr-section {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
}

.mlhdn-admin-qr-section h4 {
    margin-top: 0;
    color: #333;
}

#mlhdn-admin-qr-data {
    font-family: monospace;
    font-size: 12px;
}

#mlhdn-admin-manual-qr label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Responsive styles */
@media (max-width: 768px) {
    .mlhdn-qr-modal-content {
        margin: 10px;
        padding: 15px;
    }
    
    #mlhdn-qr-video {
        width: 100%;
        height: 200px;
    }
    
    .mlhdn-qr-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .mlhdn-loading-content {
        margin: 20px;
        padding: 20px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .mlhdn-spinner {
        animation: none;
    }
    
    .mlhdn-qr-notification,
    #mlhdn-qr-scanner-modal {
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .mlhdn-qr-scanner-section {
        border: 2px solid #000;
    }
    
    #mlhdn-qr-video {
        border: 3px solid #000;
    }
    
    .mlhdn-qr-modal-content {
        border: 2px solid #000;
    }
}

/* Focus indicators */
#mlhdn-start-qr-scan:focus,
#mlhdn-close-qr-scanner:focus,
#mlhdn-process-manual-qr:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

#mlhdn-manual-qr-data:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}