/* Packing-slip-specific controls; the original invoice styles remain shared. */
.quote-payment-toggle{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:12px;margin:7px 0 2px;font-size:.78rem;color:#536174}
.quote-payment-toggle button{border:1px solid #d7dfe5;background:#fff;color:#34485a;border-radius:6px;padding:4px 9px;font-size:.75rem}
.quote-payment-toggle button:hover{background:#f3f6fa}
@media(max-width:767px){.quote-payment-toggle{justify-content:flex-start}}
@media print{.quote-payment-toggle{display:none!important}}

.invoice-logo-area{position:relative}
.quote-remove-logo{position:absolute;right:4px;top:4px;width:25px;height:25px;line-height:20px;border:1px solid #d5dbe2;border-radius:50%;color:#424c57;background:#fff;font-size:17px;font-weight:700;cursor:pointer;z-index:2}
.quote-remove-logo:hover{color:#ad2737;border-color:#dfb2ba}
.quote-remove-logo[hidden]{display:none!important}
.invoice-pdf-host .quote-remove-logo{display:none!important}


/* Quote status picker: opening it always shows every status, even when an
   existing value is present. Custom statuses remain editable in the text field. */
.quote-method-row.is-open{position:relative;z-index:50}
.quote-method-combobox{position:relative;min-width:0;width:100%}
.invoice-paper .quote-method-combobox input[data-field="quoteStatus"]{width:100%;padding-right:32px}
.quote-method-toggle {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    height: 100%;
    max-height: 35px;
    width: 29px;
    border: 0;
    background: transparent;
    color: #59677a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 17px;
    line-height: 1;
}
.quote-method-toggle span {
    display: block;
    line-height: 1;
}
.quote-method-toggle:focus-visible{outline:2px solid #b48b44;outline-offset:-2px;border-radius:4px}
.quote-method-toggle[aria-expanded="true"] span{transform:rotate(180deg)}
.quote-method-options{position:absolute;right:0;top:calc(100% + 4px);min-width:100%;width:max(100%,205px);max-width:min(285px,calc(100vw - 48px));max-height:320px;overflow-y:auto;overscroll-behavior:contain;background:#fff;color:#182536;border:1px solid #d8dfe8;border-radius:7px;box-shadow:0 8px 22px rgba(16,32,56,.16);z-index:60;padding:4px 0}
.quote-method-options[hidden]{display:none!important}
.quote-method-options button[role="option"]{display:block;width:100%;min-height:34px;padding:8px 12px;border:0;background:#fff;color:#182536;text-align:left;font-size:.82rem;line-height:1.4;cursor:pointer;white-space:normal}
.quote-method-options button[role="option"]:hover,.quote-method-options button[role="option"].is-active{background:#f0f4fa;color:#172d53}
.quote-method-options button[role="option"][aria-selected="true"]{font-weight:700}
.quote-method-options button[role="option"][hidden]{display:none!important}
@media print{.quote-method-options,.quote-method-toggle{display:none!important}}
.invoice-pdf-host .quote-method-options,.invoice-pdf-host .quote-method-toggle{display:none!important}

/* Optional deposit schedule: leave the remaining-balance row out until a deposit is entered. */
.invoice-total-row[hidden],.invoice-pdf-host .invoice-total-row[hidden]{display:none!important}
/* Free-text quote dates with an optional native calendar shortcut. The text
   fields have no required/date-format restriction and can be completely blank. */
.invoice-paper .quote-date-field{position:relative;min-width:0;width:100%}
.invoice-paper .quote-date-field>input[data-field]{box-sizing:border-box;min-width:0;width:100%;padding-right:36px}
.quote-date-picker-toggle{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:29px;height:29px;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:inherit;opacity:.78;cursor:pointer;z-index:1}
.quote-date-picker-toggle:hover{opacity:1}
.quote-date-picker-toggle:focus-visible{opacity:1;outline:2px solid #b48b44;outline-offset:0;border-radius:4px}
/* Keep the native control rendered so showPicker works in supported browsers;
   it isn't a persisted field and never appears in the generated PDF. */
.invoice-paper .quote-date-native-picker{position:absolute!important;right:2px!important;top:calc(100% - 1px)!important;width:1px!important;min-width:0!important;height:1px!important;padding:0!important;border:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
@media print{.quote-date-picker-toggle,.quote-date-native-picker{display:none!important}}
.invoice-pdf-host .quote-date-picker-toggle,.invoice-pdf-host .quote-date-native-picker{display:none!important}
.quote-method-options[hidden]{display:none!important}

/* The PDF uses wrapping text instead of a single-line input for custom dates.
   This keeps long phrases fully visible rather than clipping their last words. */
.invoice-pdf-host .quote-pdf-date-value{box-sizing:border-box;min-width:0;width:100%;margin:0;padding:0;text-align:inherit;font:inherit;color:inherit;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}

/* Packing slips show physical shipment quantities; product prices are intentionally off by default. */
.packing-without-prices .packing-price-col,.packing-without-prices .packing-priced-totals{display:none!important}
.packing-with-prices .packing-quantity-summary{display:none!important}
[data-price-currency-group][hidden]{display:none!important}
/* The SKU field is an ordinary editable line-item control. Use the same
   boxed control as Ordered/Shipped instead of a transparent, borderless input. */
.invoice-paper .invoice-items-table td.packing-sku-col input.packing-sku-input{
    display:block;
    width:100%;
    min-width:0;
    box-sizing:border-box;
    color:inherit;
    font:inherit;
    text-align:left!important;
    border:1px solid var(--invoice-line,#d6dce5);
    border-radius:8px;
    padding:7px 8px!important;
    background:transparent;
}
.invoice-paper .invoice-items-table td.packing-sku-col input.packing-sku-input:focus{
    border-color:var(--invoice-accent,#a88e60);
    outline:0;
}
.packing-price-note{margin-top:5px;font-size:.77rem;color:#67748a;line-height:1.45}
.packing-extra-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px 17px;margin:14px 0 18px}
.packing-extra-grid .invoice-editable-label{font-size:.78rem;margin-bottom:2px}
.packing-extra-grid input{width:100%;min-width:0;border:0;border-bottom:1px solid var(--invoice-line,#dde2e8);background:transparent;color:inherit;padding:4px 2px;font:inherit;font-size:.88rem}
.packing-extra-grid input:focus{outline:1px solid var(--invoice-accent,#a88e60)}
.invoice-paper .invoice-items-table .packing-sku-input{min-width:0}
/* SKU / Code is a text identifier. Keep its column left-aligned across
   all themes; the editor header is inset to line up with the input text. */
.invoice-paper .invoice-items-table th.packing-sku-col,
.invoice-paper .invoice-items-table td.packing-sku-col{
    text-align:left!important;
    /* Keep identical cell insets even if a theme styles header/body differently. */
    padding-left:10px!important;
    padding-right:10px!important;
}
.invoice-paper .invoice-items-table th.packing-sku-col > span{
    display:block;
    text-align:left!important;
    padding-left:8px;
}
.invoice-paper .invoice-items-table td.packing-sku-col .packing-sku-input{
    margin:0!important;
    text-align:left!important;
}
/* A PDF is a finished document, not an input form. Keep the SKU value
   borderless and align its text with the heading in PDF/print output. */
.invoice-pdf-host .invoice-items-table th.packing-sku-col > span{
    padding-left:0!important;
}
.invoice-pdf-host .invoice-items-table td.packing-sku-col .packing-sku-input{
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    padding-left:0!important;
    padding-right:0!important;
}

.invoice-paper.packing-without-prices .invoice-items-table th:nth-child(1){width:43%}
.invoice-paper.packing-without-prices .invoice-items-table th:nth-child(2){width:22%}
.invoice-paper.packing-without-prices .invoice-items-table th:nth-child(3),.invoice-paper.packing-without-prices .invoice-items-table th:nth-child(4){width:13%}
.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(1){width:29%}
.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(2){width:17%}
.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(3),.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(4){width:10%}
.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(5){width:16%}
.invoice-paper.packing-with-prices .invoice-items-table th:nth-child(6){width:15%}
/* Keep the price checkbox and caption together on one horizontal row.
   The settings stylesheet gives ordinary labels block display and bottom margins,
   so use an explicit flex row and separate, properly associated label. */
.invoice-settings-panel .packing-price-toggle-row{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:9px;
    width:100%;
    min-width:0;
    box-sizing:border-box;
}
.invoice-settings-panel .packing-price-toggle-row > .packing-price-checkbox{
    display:block!important;
    flex:0 0 18px!important;
    width:18px!important;
    min-width:18px!important;
    max-width:18px!important;
    height:18px!important;
    min-height:18px!important;
    max-height:18px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:0!important;
    position:static!important;
    top:auto!important;
    transform:none!important;
    accent-color:#1a3864;
    cursor:pointer;
}
.invoice-settings-panel .packing-price-toggle-row > .packing-price-toggle-label{
    display:block!important;
    flex:1 1 auto!important;
    width:auto!important;
    min-width:0;
    margin:0!important;
    padding:0!important;
    font-size:.86rem;
    line-height:1.4!important;
    font-weight:500;
    color:#273649;
    cursor:pointer;
}
.packing-quantity-summary{min-width:180px}
.invoice-pdf-host .packing-sku-input{border:0!important;background:transparent!important}
.invoice-pdf-host .packing-extra-grid input{border:0!important}
.invoice-pdf-host .packing-extra-grid{break-inside:avoid}
@media(max-width:640px){.packing-extra-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.invoice-paper .packing-sku-input{font-size:.75rem}}
@media print{
  .packing-without-prices .packing-price-col,.packing-without-prices .packing-priced-totals{display:none!important}
  .invoice-paper .invoice-items-table th.packing-sku-col > span{padding-left:0!important}
  .invoice-paper .invoice-items-table td.packing-sku-col input.packing-sku-input{
    border:0!important;border-radius:0!important;box-shadow:none!important;
    padding-left:0!important;padding-right:0!important;
  }
}

/* All document captions (including shipment fields and quantity summaries)
   can be edited in place, just like the original Quote Generator. */
.invoice-paper [data-label-key][contenteditable="true"]{
  cursor:text!important;
  pointer-events:auto!important;
  user-select:text;
  -webkit-user-select:text;
  min-width:0;
  overflow-wrap:anywhere;
  -webkit-touch-callout:default;
}
.invoice-paper [data-label-key][contenteditable="true"]:hover{
  outline:1px dashed var(--invoice-accent,#a88e60);
  outline-offset:2px;
}
.invoice-paper [data-label-key][contenteditable="true"]:focus{
  outline:2px solid var(--invoice-accent,#a88e60)!important;
  outline-offset:2px;
  border-radius:2px;
}
@media print{
  .invoice-paper [data-label-key][contenteditable="true"]:hover,
  .invoice-paper [data-label-key][contenteditable="true"]:focus{
    outline:0!important;
  }
}
