/* Barcode Generator Tool Styles */

.barcode-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.barcode-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-color, #2d3436);
}

/* Tabs Styling */
.barcode-nav-pills {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 12px;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.barcode-nav-link {
    border-radius: 8px !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
    color: #636e72 !important;
    border: none !important;
    transition: all 0.2s ease;
}

.barcode-nav-link.active {
    background: white !important;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Preview Area */
.barcode-preview-container {
    background: #f1f3f5;
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    position: relative;
    border: 2px dashed #dee2e6;
}

#barcodeCanvas,
#barcodeResult img {
    max-width: 100%;
    height: auto !important;
}

/* Designer Label Simulation */
.label-designer-preview {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2rem;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.5 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
}

.label-designer-preview .label-header {
    text-align: center;
    width: 100%;
}

.label-designer-preview .label-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.label-designer-preview .label-subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.label-designer-preview .label-barcode-area {
    margin: 1rem 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.label-designer-preview .label-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
}

/* Batch Grid */
.batch-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.batch-item {
    background: white;
    border: 1px solid #eee;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
}

.batch-item img {
    max-width: 100%;
    height: auto;
}

.batch-item-code {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-family: monospace;
    color: #636e72;
}

/* Decoder Panel */
#decoderVideo {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    background: black;
}

.decoder-result-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(46, 204, 113, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    display: none;
    z-index: 10;
    text-align: center;
}

/* Professional Presets */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.preset-btn {
    border: 1px solid #eee;
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: left;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.preset-btn i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* RTL Support */
[dir="rtl"] .barcode-section-title i {
    margin-right: 0;
    margin-left: 0.75rem;
}

[dir="rtl"] .preset-btn {
    text-align: right;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .barcode-card {
        padding: 1rem;
    }

    .preset-grid {
        grid-template-columns: 1fr;
    }
}