:root {
    --bcg-primary: #4f46e5;
    --bcg-primary-hover: #4338ca;
    --bcg-bg: #f3f4f6;
    --bcg-surface: #ffffff;
    --bcg-text-main: #111827;
    --bcg-text-muted: #6b7280;
    --bcg-border: #d1d5db;
    --bcg-error: #ef4444;
    --bcg-radius: 12px;
    --bcg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.bcg-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bcg-text-main);
    padding: 1rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.bcg-header {
    text-align: center;
    margin-bottom: 1rem;
}

.bcg-header h1 {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.25rem !important;
    color: var(--bcg-text-main) !important;
    line-height: 1.2 !important;
}

.bcg-header p {
    color: var(--bcg-text-muted) !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
}

.bcg-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.bcg-card {
    background: var(--bcg-surface);
    padding: 2rem;
    border-radius: var(--bcg-radius);
    box-shadow: var(--bcg-shadow);
    border: 1px solid var(--bcg-border);
}

.bcg-form-group {
    margin-bottom: 1.5rem;
}

.bcg-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--bcg-text-main);
}

/* FIX: Prevent theme from squashing the input text */
.bcg-form-control {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 1px solid var(--bcg-border) !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;       /* Fixes the overlap issue */
    height: auto !important;          /* Fixes the squashed height issue */
    min-height: 45px !important;      /* Maintains a professional look */
    display: block !important;
    appearance: none !important;      /* Removes buggy theme styles */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

/* Special styling for the select dropdown arrow */
select.bcg-form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 12px !important;
    padding-right: 2.5rem !important;
}

.bcg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.bcg-color-picker {
    height: 45px !important;
    cursor: pointer;
    padding: 0.2rem !important;
}

.bcg-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bcg-slider-header {
    display: flex;
    justify-content: space-between;
}

.bcg-slider-val {
    font-size: 0.875rem;
    color: var(--bcg-text-muted);
}

.bcg-preview-card {
    display: flex;
    flex-direction: column;
}

.bcg-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bcg-bg);
    border: 2px dashed var(--bcg-border);
    border-radius: 8px;
    min-height: 250px;
    margin-bottom: 1.5rem;
    padding: 2rem; 
}

#barcodeCanvas {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    background-color: white; 
}

.bcg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--bcg-primary) !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 0.5rem;
    text-decoration: none !important;
}

.bcg-btn:hover {
    background-color: var(--bcg-primary-hover) !important;
}

.bcg-error-msg {
    color: var(--bcg-error);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
    font-weight: 500;
    display: none;
}

@media (max-width: 768px) {
    .bcg-container {
        grid-template-columns: 1fr;
    }
}