/* Keep authored words intact throughout the customer and professional UI.
   Component rules for opaque URLs, codes and user content can still opt into
   overflow-wrap: anywhere when a token is wider than the available space. */
html {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

html:lang(ko) {
  word-break: keep-all;
}

/* Chinese does not use spaces between words. The presentation helper supplies
   explicit word boundaries; without Intl.Segmenter, native CJK wrapping remains
   available instead of making a whole sentence unbreakable. */
:lang(zh)[data-ui-word-flow] {
  word-break: keep-all;
  line-break: strict;
}

:lang(zh) :is([data-i18n-value-skip], [data-word-wrap-skip]) {
  word-break: normal;
}

:where(h1, h2, h3, h4, h5, h6, p, button, label, legend, [data-i18n-text], [data-ui-copy]) {
  hyphens: none;
}

:where(h1, h2, h3, h4, h5, h6, p) {
  text-wrap: pretty;
}

/* Explicit escape hatch for unbroken URLs, identifiers and user-authored text. */
[data-word-wrap="anywhere"] {
  overflow-wrap: anywhere;
}

/* Keep translated desktop header actions within the available width. The
   professional action retains its text for assistive technology when compact. */
@media (min-width: 769px) and (max-width: 1320px) {
  .customer-topbar .top-actions > .customer-pro-entry {
    width: 44px;
    min-width: 44px;
    padding-inline: 0;
  }
  .customer-topbar .top-actions > .customer-pro-entry span {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
