/* Barcode Generator Styles */
.barcode-preview-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 20px;
    min-height: 250px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.barcode-preview-box svg {
    max-width: 100%;
    height: auto !important;
}

.barcode-options-panel {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

/* Keep the customization sliders visible across browsers and themes. */
.barcode-options-panel input[type="range"].form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    margin: 9px 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent !important;
    cursor: pointer;
}

.barcode-options-panel input[type="range"].form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
}

.barcode-options-panel input[type="range"].form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border: 0;
    border-radius: 50%;
    background: #2584dc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.barcode-options-panel input[type="range"].form-range::-moz-range-track {
    width: 100%;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
}

.barcode-options-panel input[type="range"].form-range::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: #2584dc;
}

.barcode-options-panel input[type="range"].form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: #2584dc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.barcode-export-btn {
    height: 48px;
    border-radius: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

#btn-print,
#btn-clear-settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.barcode-export-btn i,
#btn-print i,
#btn-clear-settings i {
    line-height: 1;
}

/* style.css has a global .btn-light:hover rule; keep this tool's reset action readable. */
#btn-clear-settings,
#btn-clear-settings:focus,
#btn-clear-settings:active {
    color: #dc3545 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

#btn-clear-settings:hover,
#btn-clear-settings:focus-visible {
    color: #dc3545 !important;
    background-color: #fff1f2 !important;
    border-color: #fecdd3 !important;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-input {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 40px;
    height: 38px;
    cursor: pointer;
    padding: 2px;
    background: #ffffff;
}

.barcode-preview-box canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Print Styling */
@media print {
    body * {
        visibility: hidden;
    }
    #barcode-print-wrapper, #barcode-print-wrapper * {
        visibility: visible;
    }
    #barcode-print-wrapper {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        background: white;
        padding: 20px;
    }
}
