/**
 * Premium client invoice — Client View, doc-fill, and package web pages.
 * Load after styles-gmail.css / styles-block-flush.css.
 */

/* Theme tokens — available on any premium invoice surface (including composer .ql-editor). */
.td-invoice-premium,
.line-items-preview-invoice-header.td-invoice-premium {
  --td-inv-accent: #0d9488;
  --td-inv-accent-deep: #0f766e;
  --td-inv-accent-soft: #ccfbf1;
  --td-inv-ink: #0f172a;
  --td-inv-muted: #64748b;
  --td-inv-line: #e2e8f0;
  --td-inv-surface: #ffffff;
  --td-inv-radius: 20px;
}

/* ── Outer shell (zone or adjacent header+lines embeds) ── */
.td-invoice-premium-shell,
.td-book-client-invoice-zone.td-invoice-premium-shell,
:where(:not(.ql-editor)) > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]),
:where(:not(.ql-editor)) > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]),
:where(:not(.ql-editor)) .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting),
:where(:not(.ql-editor)) .line-items-fill--invoice-header.td-invoice-premium-shell:has(+ .line-items-fill--invoice-accounting) {
  --td-inv-accent: #0d9488;
  --td-inv-accent-deep: #0f766e;
  --td-inv-accent-soft: #ccfbf1;
  --td-inv-ink: #0f172a;
  --td-inv-muted: #64748b;
  --td-inv-line: #e2e8f0;
  --td-inv-surface: #ffffff;
  --td-inv-radius: 20px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: var(--td-inv-radius) !important;
  background: var(--td-inv-surface) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.1),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset !important;
  overflow: hidden !important;
}

:where(:not(.ql-editor)) > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) + .line-items-embed[data-field-type="invoice_block"],
:where(:not(.ql-editor)) > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) + .line-items-embed[data-field-type="line_items"],
:where(:not(.ql-editor)) .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting) + .line-items-fill--invoice-accounting,
:where(:not(.ql-editor)) .line-items-fill--invoice-header.td-invoice-premium-shell:has(+ .line-items-fill--invoice-accounting) + .line-items-fill--invoice-accounting {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-top: none !important;
  border-radius: 0 0 var(--td-inv-radius) var(--td-inv-radius) !important;
  box-shadow:
    0 16px 36px rgba(15, 23, 42, 0.08) !important;
  margin-top: 0 !important;
}

.td-book-client-invoice-zone.td-invoice-premium-shell {
  margin: 20px auto 36px !important;
  max-width: 880px;
}

/* After signature in checkout chain — don't stack zone top margin on sig bottom margin */
.line-items-fill--signature + .td-book-client-invoice-zone.td-invoice-premium-shell,
[data-sf-type="signature_block"] + .td-book-client-invoice-zone.td-invoice-premium-shell,
html.td-client-view-preview .line-items-fill--signature + .td-book-client-invoice-zone.td-invoice-premium-shell,
html.td-client-view-preview [data-sf-type="signature_block"] + .td-book-client-invoice-zone.td-invoice-premium-shell {
  margin-top: 16px !important;
}

.td-invoice-premium-shell .line-items-fill--invoice-header,
.td-invoice-premium-shell .line-items-fill--invoice-accounting,
.td-invoice-premium-shell .line-items-static--invoice-accounting,
.td-invoice-premium-shell .td-invoice-sheet__header {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.td-invoice-premium-shell .line-items-fill--invoice-accounting > .line-items-fill-label,
.td-invoice-premium-shell .line-items-static--invoice-accounting > .line-items-fill-label {
  display: none !important;
}

/* ── Header hero ── */
.td-invoice-premium .line-items-preview-invoice-header--simple,
.td-invoice-premium .td-invoice-header-fill__card {
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.td-invoice-premium .line-items-preview-inv-top--simple {
  position: relative;
  min-height: 168px;
  margin: 0 !important;
  padding: 28px 28px 32px !important;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(0, 0, 0, 0.12) 0%, transparent 50%),
    linear-gradient(128deg, var(--td-inv-accent-deep, #0f766e) 0%, var(--td-inv-accent, #0d9488) 42%, #2dd4bf 100%) !important;
  overflow: hidden;
}

.td-invoice-premium .line-items-preview-inv-top--simple::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.td-invoice-premium .line-items-preview-inv-left {
  position: relative;
  z-index: 1;
}

.td-invoice-premium .line-items-preview-inv-logo-wrap--simple {
  padding: 10px 14px;
  margin-bottom: 14px !important;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.td-invoice-premium .line-items-preview-inv-logo-img--simple {
  max-width: 140px;
  max-height: 52px;
  filter: none;
}

.td-invoice-premium .line-items-preview-inv-logo--simple {
  min-width: 88px;
  height: 52px;
  margin-bottom: 14px !important;
  border: 1px dashed rgba(255, 255, 255, 0.45) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  font-size: 10px !important;
  letter-spacing: 0.14em !important;
}

.td-invoice-premium .line-items-preview-inv-title--simple {
  font-size: clamp(36px, 5vw, 48px) !important;
  font-weight: 200 !important;
  letter-spacing: -0.045em !important;
  line-height: 0.92 !important;
  color: #fff !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.td-invoice-premium .line-items-preview-inv-company-block {
  position: relative;
  z-index: 1;
  text-align: right;
  padding-top: 4px;
}

.td-invoice-premium .line-items-preview-inv-top--simple .line-items-preview-inv-company--strong {
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95) !important;
}

.td-invoice-premium .line-items-preview-inv-top--simple .line-items-preview-inv-company--subtle {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.78) !important;
  margin-top: 3px !important;
}

/* ── Bill to + meta band ── */
.td-invoice-premium .line-items-preview-inv-divider {
  display: none;
}

.td-invoice-premium .line-items-preview-inv-panels--simple {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) !important;
  gap: 20px !important;
  align-items: stretch !important;
  padding: 22px 28px 26px !important;
  margin: 0 !important;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-top: 1px solid var(--td-inv-line);
}

.td-invoice-premium .td-inv-hdr-billto {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--td-inv-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.td-invoice-premium .td-inv-hdr-billto-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  color: var(--td-inv-muted) !important;
  margin-bottom: 10px !important;
}

.td-invoice-premium .td-inv-hdr-billto-value {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--td-inv-ink) !important;
  line-height: 1.5 !important;
}

.td-invoice-premium .td-inv-hdr-billto-value > div:first-child {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.td-invoice-premium .td-inv-hdr-meta {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--td-inv-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.td-invoice-premium .td-inv-hdr-meta-row {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 12px 20px !important;
  align-items: baseline !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 13px !important;
}

.td-invoice-premium .td-inv-hdr-meta-row:last-child {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.td-invoice-premium .td-inv-hdr-meta-row span {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--td-inv-muted) !important;
}

.td-invoice-premium .td-inv-hdr-meta-row strong {
  font-size: 14px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
  color: var(--td-inv-ink) !important;
  text-align: right;
}

/* Composer / static preview panel classes (mirror td-inv-hdr-*) */
.td-invoice-premium .line-items-preview-billto--simple,
.td-invoice-premium .line-items-preview-inv-details--simple {
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--td-inv-line);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.td-invoice-premium .line-items-preview-billto-label {
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--td-inv-muted) !important;
  margin-bottom: 10px !important;
}

.td-invoice-premium .line-items-preview-billto-value {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--td-inv-ink) !important;
  line-height: 1.5 !important;
}

.td-invoice-premium .line-items-preview-inv-detail-row {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 12px 20px !important;
  align-items: baseline !important;
  padding: 9px 0 !important;
  border-bottom: 1px solid #f1f5f9 !important;
  font-size: 13px !important;
}

.td-invoice-premium .line-items-preview-inv-detail-row:last-child {
  border-bottom: none !important;
}

.td-invoice-premium .line-items-preview-inv-detail-row span {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--td-inv-muted) !important;
}

.td-invoice-premium .line-items-preview-inv-detail-row strong {
  font-size: 14px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
  color: var(--td-inv-ink) !important;
}

/* ── Line items table ── */
.td-invoice-premium .td-invoice-sheet-lines,
.td-invoice-premium .td-invoice-sheet-table-wrap {
  padding: 8px 28px 24px !important;
}

.td-invoice-premium .td-invoice-sheet__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.td-invoice-premium .td-invoice-sheet__table thead th {
  padding: 12px 14px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--td-inv-muted) !important;
  background: #f1f5f9 !important;
  border-bottom: none !important;
}

.td-invoice-premium .td-invoice-sheet__table thead th:first-child {
  border-radius: 10px 0 0 10px;
}

.td-invoice-premium .td-invoice-sheet__table thead th:last-child {
  border-radius: 0 10px 10px 0;
}

.td-invoice-premium .td-invoice-sheet__table tbody td {
  padding: 14px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: var(--td-inv-ink) !important;
  vertical-align: top;
  line-height: 1.45;
}

.td-invoice-premium .td-invoice-sheet__table tbody tr:last-child td {
  border-bottom: none !important;
}

.td-invoice-premium .td-invoice-sheet__row--alt td {
  background: transparent !important;
}

.td-invoice-premium .td-invoice-sheet__table tbody td.td-invoice-sheet__col-desc {
  font-weight: 600;
  padding-right: 20px !important;
}

.td-invoice-premium .td-invoice-sheet__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #334155;
}

.td-invoice-premium .td-invoice-sheet__table tbody td.td-invoice-sheet__num:last-child {
  font-weight: 800;
  color: var(--td-inv-ink);
}

/* Hide legacy tfoot — premium totals panel replaces it */
.td-invoice-premium .td-invoice-sheet__foot {
  display: none !important;
}

/* ── Totals panel (right-aligned, HoneyBook-beating clarity) ── */
.td-invoice-premium .td-invoice-sheet-totals {
  display: flex;
  justify-content: flex-end;
  padding: 4px 0 8px;
}

.td-invoice-premium .td-invoice-sheet-totals__panel {
  min-width: min(320px, 100%);
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border: 1px solid var(--td-inv-line);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.td-invoice-premium .td-invoice-sheet-totals__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 6px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--td-inv-muted);
}

.td-invoice-premium .td-invoice-sheet-totals__row strong {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--td-inv-ink);
}

.td-invoice-premium .td-invoice-sheet-totals__row--grand {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--td-inv-ink);
}

.td-invoice-premium .td-invoice-sheet-totals__row--grand span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--td-inv-ink);
}

.td-invoice-premium .td-invoice-sheet-totals__row--grand strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #047857;
}

.td-invoice-premium .td-invoice-sheet-empty {
  margin: 12px 28px 24px;
  padding: 20px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  text-align: center;
  font-size: 13px;
  color: var(--td-inv-muted);
}

.td-invoice-premium .td-invoice-sheet-toolbar {
  padding: 18px 28px !important;
  border-bottom: 1px solid var(--td-inv-line) !important;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%) !important;
}

@media (max-width: 640px) {
  .td-invoice-premium .line-items-preview-inv-panels--simple {
    grid-template-columns: 1fr !important;
    padding: 18px 16px 20px !important;
  }
  .td-invoice-premium .line-items-preview-inv-top--simple {
    padding: 22px 18px 26px !important;
    min-height: 0;
  }
  .td-invoice-premium .line-items-preview-inv-company-block {
    text-align: left;
    margin-top: 12px;
  }
  .td-invoice-premium .line-items-preview-inv-top--simple {
    display: flex;
    flex-direction: column;
  }
  .td-invoice-premium .td-invoice-sheet-lines,
  .td-invoice-premium .td-invoice-sheet-table-wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* Client View iframe: ensure premium wins over preview resets */
html.td-client-view-preview .td-invoice-premium-shell,
html.td-client-view-preview .td-book-client-invoice-zone.td-invoice-premium-shell {
  max-width: min(880px, 100%);
  margin-left: auto !important;
  margin-right: auto !important;
}

html.td-client-view-preview .td-invoice-premium-shell .line-items-preview-inv-top--simple {
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(0, 0, 0, 0.12) 0%, transparent 50%),
    linear-gradient(128deg, var(--td-inv-accent-deep, #0f766e) 0%, var(--td-inv-accent, #0d9488) 42%, #2dd4bf 100%) !important;
}

html.td-client-view-preview .td-invoice-premium-shell .line-items-preview-inv-title--simple {
  color: #fff !important;
}

html.td-client-view-preview .td-invoice-premium-shell .td-invoice-sheet-lines,
html.td-client-view-preview .td-invoice-premium-shell .td-invoice-sheet-table-wrap {
  padding-top: 0 !important;
}

html.td-client-view-preview .td-invoice-premium .td-invoice-sheet-totals__row--grand strong {
  font-size: 22px !important;
  color: #047857 !important;
}

/* ── Document composer editor: WYSIWYG invoice header (match Client View) ── */
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"]:has(.td-invoice-header-fill) > .line-items-label,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"][data-composer-live-preview="1"] > .line-items-label {
  display: none !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-header-fill {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Quill renders .ql-editor text with white-space: pre-wrap, so the template's
   leading newlines (around the hidden inputs) and the inter-row newlines turn
   into real vertical gaps — a tall empty band above the card and loose
   bill-to / meta rows. Collapse them to match Client View. */
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-header-fill,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-header-fill * {
  white-space: normal !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-premium,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-header-fill__card,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .line-items-preview-invoice-header.td-invoice-premium {
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: var(--td-inv-radius) !important;
  background: var(--td-inv-surface) !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px rgba(15, 23, 42, 0.1) !important;
  overflow: hidden !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-premium .line-items-preview-inv-top--simple {
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 100%, rgba(0, 0, 0, 0.12) 0%, transparent 50%),
    linear-gradient(128deg, var(--td-inv-accent-deep, #0f766e) 0%, var(--td-inv-accent, #0d9488) 42%, #2dd4bf 100%) !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .td-invoice-premium .line-items-preview-inv-title--simple {
  color: #fff !important;
}

#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]),
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) .td-invoice-premium,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) .td-invoice-premium,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) .td-invoice-header-fill__card,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) .td-invoice-header-fill__card {
  border-radius: var(--td-inv-radius) var(--td-inv-radius) 0 0 !important;
  border-bottom: none !important;
}

#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] + .line-items-embed[data-field-type="invoice_block"],
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] + .line-items-embed[data-field-type="line_items"] {
  margin-top: 0 !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-top: none !important;
  border-radius: 0 0 var(--td-inv-radius) var(--td-inv-radius) !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
}

/* Collapse Quill spacer paragraphs between invoice header + line items (even before live preview attaches). */
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] ~ p:empty:has(~ .line-items-embed[data-field-type="invoice_block"]),
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] ~ p:has(> br:only-child):has(~ .line-items-embed[data-field-type="invoice_block"]),
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] ~ p:empty:has(~ .line-items-embed[data-field-type="line_items"]),
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"] ~ p:has(> br:only-child):has(~ .line-items-embed[data-field-type="line_items"]) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* ── Document composer editor: WYSIWYG invoice line items (match Client View) ── */
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .line-items-fill--invoice-accounting {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Quill .ql-editor uses white-space:pre-wrap — template newlines in the invoice sheet HTML
   (table rows, totals panel divs) become tall gaps between Subtotal/Tax/Total and above the
   line-items table. Collapse to match Client View (same fix as invoice header above). */
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .line-items-fill--invoice-accounting,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .line-items-fill--invoice-accounting *,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium * {
  white-space: normal !important;
}

/* Unified invoice sheet: lines block flush under header panels (Client View shell uses padding-top:0). */
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) + .line-items-embed[data-field-type="invoice_block"] .td-invoice-sheet-lines,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) + .line-items-embed[data-field-type="invoice_block"] .td-invoice-sheet-table-wrap,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) + .line-items-embed[data-field-type="line_items"] .td-invoice-sheet-lines,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) + .line-items-embed[data-field-type="line_items"] .td-invoice-sheet-table-wrap {
  padding-top: 0 !important;
}

#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="invoice_block"]) + .line-items-embed[data-field-type="invoice_block"] .line-items-fill--invoice-accounting,
#composerModal .ql-editor > .line-items-embed[data-field-type="invoice_header_block"]:has(+ .line-items-embed[data-field-type="line_items"]) + .line-items-embed[data-field-type="line_items"] .line-items-fill--invoice-accounting {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium .td-invoice-sheet-totals {
  padding: 4px 0 8px !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium .td-invoice-sheet-totals__panel {
  padding: 16px 20px !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium .td-invoice-sheet-totals__row {
  padding: 6px 0 !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="invoice_block"] .td-invoice-premium .td-invoice-sheet-totals__row--grand {
  margin-top: 10px !important;
  padding-top: 14px !important;
}

/* Extend header pre-wrap collapse to the preview wrapper (hidden inputs + template newlines). */
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="invoice_header_block"] .line-items-preview * {
  white-space: normal !important;
}

/* ── Document composer editor: WYSIWYG payment block (match Client View / doc-fill) ── */
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] > .line-items-label {
  display: none !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"]) .line-items-preview,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-preview {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-fill--payment {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* Match Client View: .td-payment-section-card uses margin:32px 0 (styles-gmail / wrapPaymentSectionCardHtml).
   Editor flush rules zeroed all payment margins; restore the gap above payment when it follows
   invoice/services blocks. Top spacing lives on the embed (margin collapse safe); bottom on card. */
#composerModal .ql-editor > .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"],
#composerModal .ql-editor > .line-items-embed[data-composer-live-preview="1"] + .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] {
  margin-top: 32px !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .td-payment-section-card {
  margin: 0 0 32px 0 !important;
  padding: 18px 20px 20px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-fill-label {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 12px !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-payment-summary {
  margin: 14px 0 0 !important;
  padding: 14px 16px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%) !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-sign-first,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-simulate-note,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-done,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-cancelled {
  border-radius: 12px !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-simulate-note {
  margin-top: 12px !important;
  padding: 12px 14px !important;
  border: 1px solid #fde68a !important;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%) !important;
  color: #92400e !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .doc-fill-pay-btn {
  margin-top: 14px !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 14px 18px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2) !important;
  pointer-events: none;
  opacity: 1;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"]):has(.payment-block-static, .line-items-fill--payment) > .line-items-label,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] > .line-items-label {
  display: none !important;
}

#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .payment-block-static {
  margin: 0 !important;
  padding: 18px 20px 20px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

/* Quill renders .ql-editor text with white-space: pre-wrap, so the payment fill's
   template newlines/indentation become a tall empty band above the card. Collapse to
   match Client View. */
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-preview,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-fill--payment,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .line-items-fill--payment *,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .td-payment-section-card,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .td-payment-section-card *,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .payment-block-static,
#composerModal .ql-editor .line-items-embed:is([data-field-type="payment_block"], [data-field-key^="payment_"])[data-composer-live-preview="1"] .payment-block-static * {
  white-space: normal !important;
}

/* File upload block — match Client View / merge fill card in edit canvas */
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"][data-composer-live-preview="1"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .line-items-fill--file-upload,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .line-items-fill--file-upload *,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .td-portal-file-upload,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .td-portal-file-upload * {
  white-space: normal !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .line-items-fill--file-upload,
#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"][data-composer-live-preview="1"] .line-items-fill--file-upload {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="file_upload_block"] .td-fu-card {
  border: 1px solid #bfdbfe !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #eff6ff 0%, #ffffff 55%) !important;
  padding: 18px 18px 16px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
  box-sizing: border-box !important;
}

#composerModal .ql-editor > .line-items-embed[data-field-type="booking_block"][data-composer-live-preview="1"] + .line-items-embed[data-field-type="file_upload_block"],
#composerModal .ql-editor > .line-items-embed[data-field-type="booking_block"][data-composer-live-preview="1"] + .line-items-embed[data-field-type="file_upload_block"][data-composer-live-preview="1"],
#composerModal .ql-editor > .line-items-embed[data-field-type="booking_block"] + .line-items-embed[data-field-type="file_upload_block"] {
  margin-top: 32px !important;
}

/* Booking block — match Client View / merge fill card in edit canvas */
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"][data-composer-live-preview="1"] .line-items-preview,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .line-items-fill--booking,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .line-items-fill--booking *,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .td-portal-booking-embed,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .td-portal-booking-embed * {
  white-space: normal !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .line-items-fill--booking,
#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"][data-composer-live-preview="1"] .line-items-fill--booking {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

#composerModal .ql-editor .line-items-embed[data-field-type="booking_block"] .td-booking-card {
  border: 1px solid #bbf7d0 !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 55%) !important;
  padding: 18px 18px 16px !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08) !important;
  box-sizing: border-box !important;
}

/* ── WYSIWYG v2 canvas — mirror .ql-editor live-preview block styling ─────── */
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--payment,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .payment-block-static,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-fill--payment,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .payment-block-static {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  white-space: normal !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas > .line-items-fill--payment,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet > .line-items-fill--payment,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner > .line-items-fill--payment,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-print-layout-sheet > .line-items-fill--payment,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-book-client-invoice-zone + .line-items-fill--payment,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-fill--invoice-accounting + .line-items-fill--payment {
  margin-top: 32px !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-payment-section-card,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .payment-block-static,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-payment-section-card,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .payment-block-static {
  margin: 0 0 32px 0 !important;
  padding: 18px 20px 20px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill-label,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-fill-label {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 12px !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-payment-summary,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-payment-summary {
  margin: 14px 0 0 !important;
  padding: 14px 16px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%) !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .doc-fill-pay-btn,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .doc-fill-pay-btn {
  margin-top: 14px !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 14px 18px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.2) !important;
  pointer-events: none;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-bc-sig-block,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-bc-sig-block {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-book-client-invoice-zone,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-invoice-premium-shell,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-book-client-invoice-zone,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .td-invoice-premium-shell {
  margin: 16px 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--services + .line-items-fill--signature .td-bc-sig-block,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--services + [data-sf-type="signature_block"] .td-bc-sig-block,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-fill--services + .line-items-fill--signature .td-bc-sig-block,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner .line-items-fill--services + [data-sf-type="signature_block"] .td-bc-sig-block {
  margin-top: 16px !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-fu-card {
  border: 1px solid #bfdbfe !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #eff6ff 0%, #ffffff 55%) !important;
  padding: 18px 18px 16px !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08) !important;
  box-sizing: border-box !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-header,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-accounting,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-book-client-invoice-zone,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-preview-invoice-header,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-invoice-sheet-lines,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-invoice-sheet-lines * {
  white-space: normal !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting),
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting) {
  margin: 16px 0 0 !important;
  border: 1px solid #e2e8f0 !important;
  border-bottom: none !important;
  border-radius: 16px 16px 0 0 !important;
  background: #fff !important;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting) + .line-items-fill--invoice-accounting,
#composerModal #mergedViewOverlay.td-merged-preview-active .td-merged-view-inner :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header:has(+ .line-items-fill--invoice-accounting) + .line-items-fill--invoice-accounting {
  margin: 0 0 16px !important;
  border: 1px solid #e2e8f0 !important;
  border-top: none !important;
  border-radius: 0 0 16px 16px !important;
  background: #fff !important;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08) !important;
  overflow: hidden !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-booking-card {
  border: 1px solid #bbf7d0 !important;
  border-radius: 14px !important;
  background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 55%) !important;
  padding: 18px 18px 16px !important;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.08) !important;
  box-sizing: border-box !important;
}

/*
 * Block chrome (AI / Formatting / Values / Delete) sits at top: -13px on the invoice header.
 * Premium shells use overflow:hidden for rounded cards — lift that while the header is selected
 * so controls are not clipped (must beat the overflow:hidden rules above in this file).
 */
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-header[data-wysiwyg-block-active="1"],
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-header:has(> .composer-wysiwyg-block-chrome),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-book-client-invoice-zone:has(.line-items-fill--invoice-header[data-wysiwyg-block-active="1"]),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-book-client-invoice-zone:has(.line-items-fill--invoice-header > .composer-wysiwyg-block-chrome),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-invoice-premium-shell:has(.line-items-fill--invoice-header[data-wysiwyg-block-active="1"]),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-invoice-premium-shell:has(.line-items-fill--invoice-header > .composer-wysiwyg-block-chrome),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header[data-wysiwyg-block-active="1"],
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas :not(.td-book-client-invoice-zone) > .line-items-fill--invoice-header:has(> .composer-wysiwyg-block-chrome),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet > p:has(> .line-items-fill--invoice-header[data-wysiwyg-block-active="1"]),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet > p:has(> .td-book-client-invoice-zone .line-items-fill--invoice-header[data-wysiwyg-block-active="1"]),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet > p:has(> .td-invoice-premium-shell .line-items-fill--invoice-header[data-wysiwyg-block-active="1"]) {
  overflow: visible !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet:has(.line-items-fill--invoice-header[data-wysiwyg-block-active="1"]),
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .td-print-layout-sheet:has(.line-items-fill--invoice-header > .composer-wysiwyg-block-chrome) {
  overflow: visible !important;
}

#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-header[data-wysiwyg-block-active="1"] > .composer-wysiwyg-block-chrome,
#composerModal.composer-modal--wysiwyg-v2 #composerWysiwygCanvas .line-items-fill--invoice-header:has(> .composer-wysiwyg-block-chrome) > .composer-wysiwyg-block-chrome {
  z-index: 40 !important;
}
