/* Custom Barcode Scanner Frontend Styles */
/* This file is separate from the main plugin to prevent overwrites during updates */

/* Hide trial version messages */
*:contains("This is a trial version, upgrade to the full version"),
*:contains("trial version"),
*:contains("upgrade to the full version") {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Hide common trial message containers */
.notice,
.alert,
.warning,
.upgrade-notice,
.trial-notice,
.version-notice,
[class*="trial"],
[id*="trial"],
[class*="upgrade"],
[id*="upgrade"] {
    display: none !important;
}

/* Main Scanner Container */
.barcode-scanner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Scanner Header */
.scanner-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.scanner-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scanner-header p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Scanner Interface */
.scanner-interface {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.scanner-video-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.scanner-video {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.scanner-controls {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Control Buttons */
.scanner-btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.scanner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.scanner-btn:active {
    transform: translateY(0);
}

.scanner-btn.secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.scanner-btn.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.scanner-btn.danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

/* Results Section */
.scanner-results {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.results-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.result-barcode {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.result-time {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Status Indicators */
.scanner-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scanner-status.active {
    background: #d4edda;
    color: #155724;
}

.scanner-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.scanner-status.ready {
    background: #d1ecf1;
    color: #0c5460;
}

/* Manual Input */
.manual-input-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.manual-input-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Loading Animation */
.scanner-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .scanner-interface {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .scanner-header h1 {
        font-size: 2rem;
    }
    
    .barcode-scanner-container {
        padding: 15px;
        margin: 10px;
    }
    
    .input-group {
        flex-direction: column;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .barcode-scanner-container {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .scanner-video-container,
    .scanner-controls,
    .scanner-results,
    .manual-input-section {
        background: #34495e;
        color: #ecf0f1;
    }
    
    .input-group input {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: #4a5568;
    }
    
    .result-item {
        background: #2c3e50;
        color: #ecf0f1;
    }
}

/* Print Styles */
@media print {
    .scanner-video-container,
    .scanner-controls,
    .scanner-btn {
        display: none;
    }
    
    .barcode-scanner-container {
        box-shadow: none;
        background: white;
    }
    
    .scanner-results {
        box-shadow: none;
        border: 1px solid #000;
    }
}
