/* Reusable millimetre-based print designer and preview. */
#shipping-preview{width:min(1250px,96vw);height:92vh}.print-heading-actions{display:flex;align-items:center;gap:12px}.print-footer-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.print-footer-controls select{min-width:260px}.shipping-preview-area{background:#e9edf2}.shipping-paper{background:white;box-sizing:border-box;margin:16px auto;box-shadow:0 4px 24px #20345622;overflow:hidden}.shipping-copy{box-sizing:border-box;position:relative;overflow:hidden;border-bottom:1px dashed #a4a4a4}.shipping-copy:last-child{border-bottom:0}.shipping-copy-inner{position:relative;box-sizing:border-box;font-family:'Malgun Gothic',sans-serif;color:#111;font-size:10px;line-height:1.35}.shipping-top,.shipping-bottom{position:relative;z-index:1;box-sizing:border-box}.shipping-copy h1,.template-edit-sheet h1{margin:3px 0 5px;line-height:1.2}.shipping-copy p,.template-edit-sheet p{margin:2px 0}.shipping-copy table,.template-edit-sheet table{width:100%;border-collapse:collapse;table-layout:fixed;color:#111}.shipping-copy td,.shipping-copy th,.template-edit-sheet td,.template-edit-sheet th{border:1px solid #555;padding:2px 4px;overflow-wrap:anywhere;vertical-align:middle;font-weight:400}.shipping-copy th,.template-edit-sheet th{background:#dceee4;font-weight:600}.shipping-item-table{position:relative;z-index:1}.shipping-item-table thead th{background:#e4e6e8}.shipping-total{font-weight:700;text-align:right;border:1px solid #555;padding:5px;position:relative;z-index:1}.template-float-image{position:absolute;object-fit:contain;pointer-events:none}.shipping-overflow{outline:2px solid #d52d48;outline-offset:-2px}.shipping-print-button{color:#2858cb;background:#edf3ff;border-color:#c5d6f5}
#print-template-editor{width:min(1560px,98vw);height:95vh;max-height:95vh}.template-workspace{display:grid;grid-template-columns:295px minmax(0,1fr);flex:1;min-height:0;overflow:hidden}.template-inspector{display:block;width:auto;overflow:auto;border-right:1px solid #d9e2ef;background:#fff;padding:14px;min-height:0}.template-inspector details{border-bottom:1px solid #e4e9f1;padding:10px 0}.template-inspector summary{font-weight:600;color:#344762;cursor:pointer;margin-bottom:10px}.template-inspector label{display:grid;gap:5px;font-size:12px;color:#586a83;margin:9px 0}.template-inspector input,.template-inspector select{width:100%;min-width:0;padding:7px 8px;font-size:12px}.template-inspector label.tpl-check,.tpl-section-checks label{display:flex;align-items:center;gap:7px}.template-inspector input[type=checkbox]{width:16px;height:16px;margin:0}.tpl-section-checks,.tpl-size-fields,.tpl-margin-fields{display:grid;grid-template-columns:1fr 1fr;gap:6px}.tpl-column-card,.tpl-rule-card,.tpl-image-card{border:1px solid #e0e7f1;padding:8px;border-radius:5px;margin:8px 0;display:grid;gap:6px}.tpl-column-card>div{display:flex;gap:5px}.template-inspector button{font-size:11px;padding:5px 8px}.template-design{display:flex;flex-direction:column;min-height:0;min-width:0;background:#e8edf3}.template-toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:10px;background:#f8faff;border-bottom:1px solid #dce4f0;flex-shrink:0}.template-toolbar button,.template-toolbar select{font-size:12px;padding:5px 8px}.template-toolbar input[type=color]{width:32px;height:30px;padding:2px}.template-canvas-scroll{overflow:auto;flex:1;padding:20px 38px 40px;min-height:0}.template-edit-sheet{position:relative;background:white;outline:1px dashed #e26262;margin:0 auto;box-shadow:0 4px 15px #20345615;font-family:'Malgun Gothic',sans-serif;font-size:10px;line-height:1.35;box-sizing:border-box}.template-edit-sheet .template-float-image{pointer-events:auto;cursor:move;outline:1px dashed #6196c9;touch-action:none}.tpl-edit-section{position:relative;box-sizing:border-box;border-bottom:1px dashed #447cc9;z-index:1}.tpl-region-label{position:absolute;left:-35px;top:3px;color:#637e9e;font-size:9px;user-select:none}.tpl-rich-editor{min-height:inherit;outline:none}.tpl-rich-editor:focus{box-shadow:inset 0 0 0 1px #7ba5ed}.design-ruler{height:18px;border-top:1px solid #9faec0;color:#71849c;font-size:10px;white-space:pre;background:repeating-linear-gradient(90deg,transparent 0,transparent 18px,#c3cedb 18px,#c3cedb 19px);margin:0 auto;max-width:850px}#tpl-dimensions{font-size:12px;color:#526d91;margin-bottom:12px}#tpl-editor-warning{margin:8px 14px;padding:8px 12px;font-size:12px}.template-inspector small{font-size:11px;color:#7c8da5}.print-footer-controls button{white-space:nowrap}
@media(max-width:850px){.template-workspace{grid-template-columns:235px minmax(0,1fr)}.template-canvas-scroll{padding:16px 36px}.print-footer-controls select{min-width:160px}}
#shipping-print-root{display:none}
@media print{html,body{margin:0!important;padding:0!important;background:white!important}body.printing-shipping>*{display:none!important}body.printing-shipping>#shipping-print-root{display:block!important;position:absolute!important;left:0!important;top:0!important;margin:0!important;padding:0!important;width:auto!important;height:auto!important;overflow:visible!important}body.printing-shipping dialog,body.printing-shipping dialog::backdrop{display:none!important}body.printing-shipping .shipping-paper{box-shadow:none;margin:0;break-inside:avoid;break-after:page;page-break-after:always;overflow:hidden}body.printing-shipping .shipping-paper:last-child{break-after:auto;page-break-after:auto}body.printing-shipping .shipping-paper,body.printing-shipping .shipping-paper *{-webkit-print-color-adjust:exact;print-color-adjust:exact}}


.template-toolbar select{width:auto;max-width:170px;flex:0 1 auto;min-width:65px}.template-toolbar #tpl-field{max-width:150px}.template-toolbar input[type=color]{flex:0 0 32px}.template-inspector label.tpl-check,.tpl-section-checks label{flex-direction:row;justify-content:flex-start;flex-wrap:nowrap}.tpl-section-checks{grid-template-columns:repeat(3,1fr)}.template-inspector input[type=checkbox]{flex:0 0 16px}.template-inspector .tpl-rule-card input[type=color]{width:100%;height:30px}

.shipping-paper.shipping-landscape{display:flex;flex-direction:row;align-items:flex-start}.shipping-landscape>.shipping-copy{flex:0 0 auto;border-bottom:0;border-right:1px dashed #a4a4a4}.shipping-landscape>.shipping-copy:last-child{border-right:0}

.shipping-print-button{background:#f1f3f6;color:#8793a3;border-color:#dbe1e9}.shipping-print-button.is-printed{background:#2858cb;color:#fff;border-color:#2858cb;font-weight:600}.shipping-print-button.is-printed:hover{background:#1d46ab}#shipping-print-complete{width:min(550px,94vw)}

.shipping-copy-frame{position:relative;overflow:hidden;box-sizing:border-box}

#shipping-print-warning{flex-shrink:0;margin:10px 20px;padding:9px 12px;font-size:12px;line-height:1.5}

#shipping-save-dialog{width:min(580px,94vw)}#shipping-save-dialog .modal-content label{display:grid;gap:8px;margin-bottom:16px}#shipping-save-dialog small{font-size:12px;line-height:1.6;color:#6d7e96}
.table-cell-toolbar{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px 10px;background:#f1f5fc;border-bottom:1px solid #dce4f0;flex-shrink:0}.table-cell-toolbar button,.table-cell-toolbar select{font-size:11px;padding:4px 6px}.table-cell-toolbar label{display:flex;align-items:center;gap:4px;font-size:11px}.table-cell-toolbar input[type=color]{width:28px;height:25px;padding:1px}.table-cell-toolbar small{width:100%;font-size:11px;color:#657895}.tpl-rich-editor td.tpl-cell-selected,.tpl-rich-editor th.tpl-cell-selected{outline:2px solid #4279e8;outline-offset:-2px}.tpl-rich-editor table{table-layout:fixed}

.template-toolbar #tpl-font-size{width:76px;min-width:76px;flex:0 0 76px;padding:5px 7px;font-size:12px;}

.table-cell-toolbar [data-cell-apply]{background:#2858cb;color:#fff;border-color:#2858cb;}

.table-cell-toolbar .table-style-apply{width:100%;}

.table-cell-toolbar .table-style-control{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:0 3px;}.table-cell-toolbar .table-style-control label{height:28px;}.table-cell-toolbar .table-style-control button{width:100%;}
.table-cell-toolbar .table-style-control{display:grid;grid-template-rows:auto auto;gap:6px;align-self:start;min-width:90px;flex:0 0 auto;}
.table-cell-toolbar .table-style-control label{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:5px;height:auto;margin:0;line-height:1.4;}
.table-cell-toolbar .table-style-control select{display:block;box-sizing:border-box;width:100%;height:30px;min-height:30px;margin:0;flex:none;}
.table-cell-toolbar .table-style-control input[type=color]{display:block;box-sizing:border-box;width:100%;height:30px;min-height:30px;margin:0;flex:none;}
.table-cell-toolbar .table-style-control button{display:block;box-sizing:border-box;height:30px;min-height:30px;margin:0;padding:4px 10px;line-height:20px;position:static;}

/* Keep document metrics identical with and without the application stylesheet. */
.shipping-paper,.shipping-paper *,.template-edit-sheet,.template-edit-sheet *{box-sizing:border-box;font-synthesis:none;}
.shipping-copy table,.template-edit-sheet table{font-size:12px;text-align:left;}
.shipping-copy thead,.template-edit-sheet thead{color:#111;}
.shipping-copy th,.template-edit-sheet th{white-space:normal;}
.shipping-copy tbody tr:hover,.template-edit-sheet tbody tr:hover{background:transparent;}
.shipping-copy h2,.shipping-copy h3,.shipping-copy p,.template-edit-sheet h2,.template-edit-sheet h3,.template-edit-sheet p{margin:0;}
.shipping-copy h1,.template-edit-sheet h1{font-weight:650;letter-spacing:-1px;}

.cell-background-label{display:flex;align-items:center;gap:5px;height:16px;}.table-cell-toolbar .table-style-control button[data-cell-picture]{width:26px;height:20px;min-height:20px;padding:0;line-height:18px;background:white;color:#2858cb;}

#shipping-settings[hidden]{display:none!important;}
