﻿
.preview-container {
    max-width: 900px !important;
    font-family: system-ui;
    text-align: center;
    display: grid;
    grid-template-columns: 1fr 1fr; /* left | right */
    grid-template-rows: 1fr auto; /* top (fills) | bottom */
    gap: 20px;
    margin-bottom: 20px;
}

/* ------------------------------------------------------
   LEFT — TOP (full height + scroll)
------------------------------------------------------ */
.barcode-column1 {
    min-width: 350px;
    max-height: 350px;
    overflow-x: hidden;
    grid-column: 1;
    grid-row: 1;
    padding-top: 20px;
    border-radius: 6px;
}

/* ------------------------------------------------------
   RIGHT — FULL HEIGHT
------------------------------------------------------ */
.barcode-column2 {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0,0,0,0.25);
    display: grid;
}

/* ------------------------------------------------------
   LEFT — BOTTOM
------------------------------------------------------ */
.barcode-column3 {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-left: 50px;
    margin-right: 50px;
    font-weight: bold;
    border-top: solid 0.5px #ccc;
}

.barcode-column3 button{
    font-weight: bold;
    min-width: 80px;
}

.barcode-column3 select{
    font-weight: 500;
    min-width: 100px;
}

.canvas-column {
    display: flex;
    flex: 1;
    background: #cce5ff;
    border-radius: 6px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.canvas-column canvas {
    width: 100%;
    height: 100%;
    background: #cce5ff;
    border-radius: 6px;
}

.input-column {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.input-column-name {
    padding: 20px;
}

.barcode-column3-saveexit {
    grid-column: 1;
    grid-row: 2;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-left: 50px;
    margin-right: 50px;
    font-weight: bold;
    border-top: solid 0.5px #ccc;
}

.barcode-column3-saveexit button{
    width: 90px;
    font-weight:bold;
}

/* ------------------------------------------------------
   InvoiceEditorPopup only

   The rules above are shared with BarcodeEditorPopup and the two SaveExit popups, so the
   Invoice Editor's own sizing hangs off a .invoice-editor-popup modifier on the container and
   leaves those three untouched.
------------------------------------------------------ */

/* The modal is ModalSize.Automatic, so it shrinks to whatever this grid measures. Trimming
   the container cap, the left column and the internal padding takes it from ~900px to ~640px. */
.preview-container.invoice-editor-popup {
    max-width: 640px !important;
    gap: 14px;
    margin-bottom: 14px;
}

.invoice-editor-popup .barcode-column1 {
    min-width: 280px;
    max-height: 260px;
    padding-top: 10px;
}

.invoice-editor-popup .barcode-column2 {
    padding: 12px;
}

.invoice-editor-popup .canvas-column {
    margin-bottom: 12px;
}

.invoice-editor-popup .input-column {
    padding: 10px;
    gap: 8px;
}

.invoice-editor-popup .input-column-name {
    padding: 10px;
}

/* Create / Cancel / More sat on three different baselines: the buttons are Bootstrap .btn
   (~38px) while More is a .form-item select that PrintPopup.css gives a 30px height and a
   10px top margin. Centre the row and give all three the same 34px box. The generous
   padding-top leaves room for the floating "More" label, which sits at top:-8px. */
.invoice-editor-popup .barcode-column3 {
    padding: 18px 0 0;
    margin-left: 0;
    margin-right: 0;
    gap: 12px;
    align-items: center;
}

.invoice-editor-popup .barcode-subcolumn3 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.invoice-editor-popup .barcode-column3 button {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
}

.invoice-editor-popup .barcode-column3 .form-item-1,
.invoice-editor-popup .barcode-column3 .form-item {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.invoice-editor-popup .barcode-column3 select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: transparent;
}

/* "Is Cover?" — a plain inline checkbox, greyed out once the format exists. */
.invoice-editor-popup .form-item-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
    text-align: left;
}

.invoice-editor-popup .form-item-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #3399ff;
    flex-shrink: 0;
}

.invoice-editor-popup .form-item-check label {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
}

.invoice-editor-popup .form-item-check input[type="checkbox"]:disabled,
.invoice-editor-popup .form-item-check input[type="checkbox"]:disabled + label {
    cursor: not-allowed;
    opacity: 0.6;
}

/* ------------------------------------------------------
   VoucherEditorPopup only

   The same Create / Cancel / More misalignment the Invoice Editor had: the buttons are Bootstrap
   .btn (~38px) while More is a .form-item select carrying PrintPopup.css's 30px height and 10px
   top margin, so it sat low and short. Only the footer row is corrected here — the voucher popup
   keeps the shared container sizing above, so its width is unchanged.
------------------------------------------------------ */
.voucher-editor-popup .barcode-column3 {
    align-items: center;
}

.voucher-editor-popup .barcode-subcolumn3 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.voucher-editor-popup .barcode-column3 button {
    height: 34px;
    padding: 0 14px;
    border-radius: 6px;
}

/* The select's own wrappers carry the 10px top margin and the 30px cap. Clearing them lets the
   grid centre it against the buttons; .form-item keeps position:relative from the base rule, so
   the floating "More" label still anchors to it. */
.voucher-editor-popup .barcode-column3 .form-item-1,
.voucher-editor-popup .barcode-column3 .form-item {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.voucher-editor-popup .barcode-column3 select {
    display: block;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: transparent;
}