/* Loaded in the head on workspace and standalone document screens. */
html[data-privacy="on"] :is([data-private], [data-out], #invoice-recipient-address, #invoice-previous-title, #invoice-previous-items, #invoice-previous-total, #corporate-lookup-results, .alert),
html[data-privacy="on"] input:not([data-privacy-visible]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-privacy="on"] textarea,
html[data-privacy="on"] select {
  color: transparent !important;
  text-shadow: none !important;
  -webkit-text-fill-color: transparent !important;
  user-select: none !important;
}
html[data-privacy="on"] :is([data-private], [data-out], #invoice-recipient-address, #invoice-previous-title, #invoice-previous-items, #invoice-previous-total, #corporate-lookup-results, .alert) * {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}
/* Keep the original layout and values intact; display a fixed mask over private text. */
html[data-privacy="on"] [data-privacy-mask] { position: relative; }
html[data-privacy="on"] [data-privacy-mask]::after {
  content: attr(data-privacy-mask);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--night-text, var(--ink, #354c43)) !important;
  -webkit-text-fill-color: currentColor !important;
  white-space: nowrap;
  pointer-events: none;
}
/* Native form controls cannot render ::after; use an unfilled text mask. */
html[data-privacy="on"] input:not([data-privacy-visible]):not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-privacy="on"] textarea,
html[data-privacy="on"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='24'%3E%3Ctext x='8' y='18' font-family='sans-serif' font-size='16' fill='%2375867e'%3E***%3C/text%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
}
html[data-privacy="on"] input::placeholder,
html[data-privacy="on"] textarea::placeholder { color: transparent !important; }
html[data-privacy="on"] .invoice-seal,
html[data-privacy="on"] img[src*="invoice-seal.php"] { visibility: hidden !important; }
.privacy-toggle { white-space: nowrap; }
@media print { .privacy-toggle { display: none !important; } }
