.yx-locales,
[data-yx-locale] {
  --yx-locale-font: var(--wp--preset--font-family--manrope, Manrope), Manrope, "Noto Sans", "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Thai", "Noto Sans Khmer", "Noto Sans Sinhala", "Noto Sans Tamil", "Noto Sans Myanmar", "PingFang SC", "Microsoft YaHei", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Malgun Gothic", "Nirmala UI", "Leelawadee UI", "Myanmar Text", "Segoe UI", Arial, sans-serif;
}

[data-yx-locale="zh"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; }
[data-yx-locale="ja"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
[data-yx-locale="ko"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
[data-yx-locale="fa"] body.yx-design,
[data-yx-locale="ur"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", sans-serif; }
[data-yx-locale="si"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans Sinhala", "Sinhala Sangam MN", "Nirmala UI", sans-serif; }
[data-yx-locale="ta"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans Tamil", "Tamil Sangam MN", "Nirmala UI", sans-serif; }
[data-yx-locale="my"] body.yx-design { --yx-locale-font:"YX Inter", "Noto Sans Myanmar", "Myanmar Sangam MN", "Myanmar Text", sans-serif; }

[data-yx-locale] body,
[data-yx-locale] :is(.yx-site-main, .yx-b2b-home),
.yx-locales {
  font-family: var(--yx-locale-font);
}

.yx-locales.yx-url-languages {
  min-inline-size: 0;
  max-inline-size: 100%;
  letter-spacing: 0;
}

.yx-locales.yx-url-languages .yx-language-menu {
  position: relative;
  box-sizing: border-box;
  width: 224px;
  min-width: 0;
  max-width: min(100%, calc(100vw - 32px));
  color: var(--yx-ink, #171b19);
  font-size: 14px;
  line-height: 1.65;
  text-align: start;
}

.yx-locales.yx-url-languages summary {
  display: list-item;
  box-sizing: border-box;
  min-block-size: 44px;
  padding: 9px 12px;
  border: 1px solid var(--yx-line, #dce3df);
  border-radius: 4px;
  background: var(--yx-white, #fff);
  list-style-position: inside;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.yx-locales.yx-url-languages summary::marker {
  color: var(--yx-green-dark, #0f4f38);
}

.yx-locales.yx-url-languages .yx-language-menu img {
  display: inline-block;
  box-sizing: content-box;
  width: 24px;
  height: 18px;
  min-width: 24px;
  max-width: 24px;
  min-height: 18px;
  max-height: 18px;
  flex: 0 0 24px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  vertical-align: middle;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.yx-locales.yx-url-languages summary > img {
  margin-inline: 4px 8px;
}

.yx-locales.yx-url-languages summary > span {
  unicode-bidi: isolate;
}

.yx-locales.yx-url-languages .yx-language-options {
  position: absolute;
  inset: auto;
  inset-block-start: calc(100% + 4px);
  inset-inline-end: 0;
  z-index: 30;
  box-sizing: border-box;
  width: 288px;
  max-width: calc(100vw - 32px);
  max-height: min(480px, calc(100vh - 120px));
  max-block-size: min(480px, calc(100dvh - 120px));
  margin: 0;
  padding: 4px;
  border: 1px solid var(--yx-line, #dce3df);
  border-radius: 4px;
  background: var(--yx-white, #fff);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: var(--yx-copy, #46504b) var(--yx-soft, #f3f6f4);
  scroll-padding-block: 4px;
}

.yx-locales.yx-url-languages .yx-language-options a {
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-block-size: 44px;
  max-inline-size: 100%;
  padding: 9px 12px;
  color: var(--yx-ink, #171b19);
  font-size: inherit;
  line-height: inherit;
  text-align: start;
  white-space: normal;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.yx-locales.yx-url-languages .yx-language-options a > span {
  flex: 1 1 auto;
  min-inline-size: 0;
  unicode-bidi: isolate;
}

.yx-locales.yx-url-languages .yx-language-options small {
  flex: 0 1 30%;
  min-inline-size: 0;
  color: var(--yx-copy, #46504b);
  font-size: 12px;
  unicode-bidi: plaintext;
}

.yx-locales.yx-url-languages .yx-language-options a[aria-current="page"] {
  color: var(--yx-green-dark, #0f4f38);
  background: var(--yx-mint, #e8f2ed);
  font-weight: 700;
  text-decoration: underline;
}

.yx-locales.yx-url-languages .yx-language-options a:hover,
.yx-locales.yx-url-languages summary:hover {
  color: var(--yx-green-dark, #0f4f38);
  background: var(--yx-soft, #f3f6f4);
}

.yx-locales.yx-url-languages :is(summary, .yx-language-options a):focus-visible {
  outline: 2px solid var(--yx-green, #176b4d);
  outline-offset: -2px;
}

/* Keep native text readable without changing the stock grids or photo geometry. */
[data-yx-locale] :is(.yx-site-main, .yx-b2b-home, .yx-site-footer) :is(h1, h2, h3, p, dt, dd, label, legend),
[data-yx-locale] :is(.yx-button, .yx-b2b-button, .wp-block-navigation-item__content) {
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

[data-yx-locale] :is(.yx-button, .yx-b2b-button) {
  max-inline-size: 100%;
  white-space: normal;
}

[data-yx-locale] .yx-color-card a > div {
  flex-wrap: wrap;
}

[data-yx-locale="km"] :is(h1, h2, h3) {
  line-height: 1.45;
}

:is([data-yx-locale="th"], [data-yx-locale="hi"], [data-yx-locale="bn"], [data-yx-locale="ar"]) :is(h1, h2, h3) {
  line-height: 1.35;
}

[data-yx-locale] :is(code, pre, input[type="email"], input[type="tel"], input[type="number"], input[name="contact"], [data-yx-code], .yx-color-card a > div > span, .yx-inquiry-product-url, a[href^="mailto:"], a[href^="tel:"]) {
  direction: ltr;
  unicode-bidi: isolate;
}

[data-yx-locale] :is(input, select, textarea) {
  text-align: start;
}

[data-yx-locale][dir="rtl"] :is(.yx-mobile-material-menu summary, .yx-mobile-material-menu a, .yx-guide-body caption, .yx-guide-body th, .yx-guide-body td) {
  text-align: start;
}

[data-yx-locale][dir="rtl"] :is(.yx-guide-body ul, .yx-guide-body ol, .yx-sourcing-steps) {
  padding-left: 0;
  padding-inline-start: 24px;
}

[data-yx-locale][dir="rtl"] :is(.yx-guide-toc ol, .yx-guide-context ul) {
  padding-left: 0;
  padding-inline-start: 20px;
}

[data-yx-locale][dir="rtl"] .yx-guide-body li {
  padding-left: 0;
  padding-inline-start: 4px;
}

[data-yx-locale][dir="rtl"] .yx-shoe-legend li {
  padding-left: 0;
  padding-inline-start: 32px;
}

[data-yx-locale][dir="rtl"] .yx-b2b-shoe-list li {
  padding-left: 0;
  padding-inline-start: 28px;
}

[data-yx-locale][dir="rtl"] :is(.yx-shoe-legend li, .yx-b2b-shoe-list li)::before {
  left: auto;
  inset-inline-start: 0;
}

@media (max-width: 1199px) {
  /* The incumbent script, or its conditional fallback, moves this host. */
  header .yx-locales.yx-url-languages { display: none; }
  header .wp-block-navigation__responsive-container-content .yx-locales.yx-url-languages {
    display: block;
    align-self: stretch;
    box-sizing: border-box;
    width: 100%;
    max-width: min(320px, 100%);
    margin-inline: 0;
  }
  header .wp-block-navigation__responsive-container-content .yx-locales .yx-language-menu {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }
  header .wp-block-navigation__responsive-container-content .yx-locales .yx-language-options {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    max-height: min(480px, 50vh);
    max-block-size: min(480px, 50dvh);
    margin-block-start: 4px;
  }
}

@media (max-width: 700px) {
  [data-yx-locale][dir="rtl"] .yx-b2b-process li {
    padding-left: 0;
    padding-inline-start: 40px;
  }
  [data-yx-locale][dir="rtl"] .yx-b2b-requirements__grid article {
    padding-left: 0;
    padding-inline-start: 42px;
  }
  [data-yx-locale][dir="rtl"] :is(.yx-b2b-process li > span, .yx-b2b-requirements__grid article > img) {
    left: auto;
    inset-inline-start: 0;
  }
}
