/* Language choice (every plan), part 2: making every language fit and look native — room for longer words in
   Settings, and native typefaces for Japanese and Chinese. (Locked settings show a plan tag: airshow_plan_tags.css.) */
/* Other languages run longer than English: a choice box grows to fit its words (up to about 60% of the row) and
   the label beside it wraps onto a second line instead of either being cut off. */
html:not([data-ui-language="en"]) .topbar-settings-item:not(.topbar-settings-item-eta-time-zone) > .topbar-settings-select {
  width: auto;
  min-width: clamp(96px, 44%, 132px);
  max-width: 62%;
}
html:not([data-ui-language="en"]) .topbar-settings-item:not(.topbar-settings-item-eta-time-zone) > .topbar-settings-label {
  flex: 1 1 0;
  min-width: 0;
}
/* The five stops under the Performance slider may take two lines in other languages. */
html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale {
  align-items: flex-start;
  gap: 4px;
}
html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span {
  flex: 0 1 auto;
  max-width: 21%;
  white-space: normal;
  line-height: 1.15;
}
html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span:first-child {
  text-align: left;
}
html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span:last-child {
  text-align: right;
}
html:not([data-ui-language="en"]) .topbar-settings-stack-head > .topbar-settings-label {
  min-width: 0;
}

/* Japanese and Chinese: kana and Han characters come from one native system typeface (the bundled Pretendard has
   kana but no Han characters, which would mix two typefaces inside a word); Latin letters and digits stay
   Pretendard. A missing local font simply falls through to the next one, so nothing is ever drawn as a box. */
@font-face {
  font-family: "Aeroshow CJK JP";
  font-weight: 100 549;
  src: local("Hiragino Sans W3"), local("HiraginoSans-W3"), local("Yu Gothic UI Regular"), local("YuGothicUI-Regular"),
    local("Meiryo UI"), local("MeiryoUI"), local("Noto Sans CJK JP Regular"), local("NotoSansCJKjp-Regular"), local("NotoSansJP-Regular");
  unicode-range: U+3000-30FF, U+31F0-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Aeroshow CJK JP";
  font-weight: 550 1000;
  src: local("Hiragino Sans W6"), local("HiraginoSans-W6"), local("Yu Gothic UI Bold"), local("YuGothicUI-Bold"),
    local("Meiryo UI Bold"), local("MeiryoUI-Bold"), local("Noto Sans CJK JP Bold"), local("NotoSansCJKjp-Bold");
  unicode-range: U+3000-30FF, U+31F0-31FF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Aeroshow CJK SC";
  font-weight: 100 549;
  src: local("PingFang SC Regular"), local("PingFangSC-Regular"), local("Microsoft YaHei UI"), local("MicrosoftYaHeiUI"),
    local("Microsoft YaHei"), local("MicrosoftYaHei"), local("Noto Sans CJK SC Regular"), local("NotoSansCJKsc-Regular"), local("NotoSansSC-Regular");
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Aeroshow CJK SC";
  font-weight: 550 1000;
  src: local("PingFang SC Semibold"), local("PingFangSC-Semibold"), local("Microsoft YaHei UI Bold"), local("MicrosoftYaHeiUI-Bold"),
    local("Microsoft YaHei Bold"), local("MicrosoftYaHei-Bold"), local("Noto Sans CJK SC Bold"), local("NotoSansCJKsc-Bold");
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
:root {
  --airshow-cjk-jp-font-family: "Aeroshow CJK JP", "Pretendard Variable", "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
  --airshow-cjk-sc-font-family: "Aeroshow CJK SC", "Pretendard Variable", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
html[data-ui-language="ja"] {
  --airshow-ui-font-family: var(--airshow-cjk-jp-font-family);
}
html[data-ui-language="zh-CN"] {
  --airshow-ui-font-family: var(--airshow-cjk-sc-font-family);
}
/* The picker names every language in its own script, so its keys pick the matching typeface whatever the UI language. */
.ife-lang [lang="ja"] {
  font-family: var(--airshow-cjk-jp-font-family);
}
.ife-lang [lang="zh-CN"] {
  font-family: var(--airshow-cjk-sc-font-family);
}

/* Phone-sized settings: the language list gets its own full-width line (names like "Português (Brasil)" are long),
   and the Performance slider keeps only its two ends and the middle stop in other languages. */
@media (pointer: coarse) and (max-width: 980px), (hover: none) and (max-width: 980px), (any-hover: none) and (max-width: 980px), (max-width: 980px) and (max-height: 700px) {
  .topbar-settings-item.topbar-settings-item-language {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .topbar-settings-item.topbar-settings-item-language > .topbar-settings-label {
    flex: 1 0 100%;
  }
  .topbar-settings-item-language > #setting-ui-language {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span:nth-child(2),
  html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span:nth-child(4) {
    display: none;
  }
  html:not([data-ui-language="en"]) #setting-performance-mode + .topbar-settings-range-scale > span {
    max-width: 34%;
  }
}

/* A long Settings title ("Einstellungen", "Configurações") moves the round buttons to a second line instead of
   pushing the close button out of the panel. */
html:not([data-ui-language="en"]) .topbar-settings-head-row {
  flex-wrap: wrap;
  row-gap: 8px;
}
html:not([data-ui-language="en"]) .topbar-settings-head-actions {
  margin-left: auto;
}

/* Capital accents and cedillas (É, È, Ç, Ş) need room above and below the line inside buttons that clip overflowing
   text, such as the welcome card's START button ("DÉMARRER"). */
html:not([data-ui-language="en"]) .startup-ticket-action-btn span {
  padding-block: 0.2em;
  margin-block: -0.2em;
}
