/* ===== Shipping label print sheet (js/shipping-label-print.js) =====
   Builds on the shared bottom sheet (css/sheet.css: .ds-sheet, .ds-sheet-list, .ds-sheet-item). Tokens only.
   The PRINTED copy is styled by the print-only CSS the script injects (@page per destination), not here. */
/* #4098: the sheet opens from INSIDE the shipping label modal (.modal-overlay, z 10000), but the shared .ds-sheet sits at
   9400/9401 (below every app modal, for the account menu), so it opened BEHIND the modal. This sheet's own scrim and sheet
   go above the modal band and the #3970 photo chooser (10010/10011), below toasts (20001) and the feedback widget (99997+).
   Two classes, so these win over .ds-sheet-scrim / .ds-sheet whatever the link order; the shared sheet is unchanged. */
.ds-sheet-scrim.slp-sheet-scrim { z-index: 10100; }
.ds-sheet.slp-sheet { z-index: 10101; }
.slp-preview {
  display: block; margin: 0 auto 0.75rem; max-width: 100%; max-height: 38dvh; width: auto; height: auto;
  border: 1px solid var(--border); border-radius: 6px; background: white;
}
/* Phone: the whole sheet must fit without scrolling, or the Print button sits under the floating feedback bubble
   (topmost by design; .ds-sheet's clearance only applies at the END of a scrolled sheet). */
@media (max-width: 699px) { .slp-preview { max-height: 24dvh; } }
/* #4099: an envelope label is a 7.5 x 2.31 in strip; full width keeps its text readable in the preview. */
.slp-preview.slp-preview-envelope { width: 100%; max-height: none; }
.slp-office-note { margin: 0.75rem 0 0; font-size: 0.85rem; color: var(--text-muted); }
.slp-dest { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.slp-dest-text { display: flex; flex-direction: column; min-width: 0; }
.slp-dest-name { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.slp-dest-sub { font-size: 0.8rem; color: var(--text-muted); }
.slp-dest-disabled { cursor: not-allowed; opacity: 0.55; }
.slp-dest-disabled .slp-dest-sub { color: var(--warning-text); }
.slp-error {
  margin: 0.75rem 0 0; padding: 0.5rem 0.75rem; border-radius: 8px;
  background: var(--error-bg); color: var(--error-text); border: 1px solid var(--error-border);
}
.slp-print { display: block; width: 100%; min-height: 44px; margin-top: 0.85rem; }
/* Desktop: the same sheet as a centered dialog. */
@media (min-width: 700px) {
  .slp-sheet {
    left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 2rem)); border-radius: 14px; padding-bottom: 1rem; max-height: 90dvh;
  }
  .slp-sheet .ds-sheet-grab { display: none; }
}
