
/* Prevent a source-language flash while the saved language is being applied.
   The inline timeout on each page restores visibility if JavaScript fails. */
html[data-i18n-pending="1"] body {
  visibility: hidden;
}

/* LedgerChase i18n v2: isolated layout support for selectors added to pages
   that previously had no language control. Existing page styles remain intact. */

.i18n-v2-header-select {
  flex: 0 0 auto;
  max-width: 150px;
}

.i18n-v2-portal-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: min(100%, 220px);
}

.i18n-v2-portal-actions .language-select {
  width: min(100%, 150px);
}

.i18n-v2-portal-actions .portal-r10-security {
  max-width: 260px;
}

/* Long translations may wrap instead of overflowing cards, tabs or buttons. */
body[data-i18n-ready="2"] :is(button, a, label, small, strong, span, p, h1, h2, h3, option) {
  overflow-wrap: anywhere;
}

body[data-i18n-ready="2"] .language-select,
body[data-i18n-ready="2"] code,
body[data-i18n-ready="2"] pre,
body[data-i18n-ready="2"] [data-no-i18n] {
  overflow-wrap: normal;
}

@media (max-width: 860px) {
  .i18n-v2-header-select {
    width: 100%;
    max-width: none;
  }

  .i18n-v2-portal-actions {
    width: 100%;
    justify-items: stretch;
  }

  .i18n-v2-portal-actions .language-select {
    width: 100%;
    max-width: none;
  }
}
