/* Load after nodex-redesign.css. The switch works without JavaScript. */
.nx-language-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid #445063;
  border-radius: 8px;
  background: #111720;
  font-family: var(--nx-font, system-ui, sans-serif);
}
.nx-language-switch a,
.nx-header .nx-language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 37px;
  min-height: 36px;
  padding: 8px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #b2bece;
  background: transparent;
  font: 600 11px/1.2 var(--nx-font, system-ui, sans-serif);
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .15s ease, background-color .15s ease;
}
.nx-language-switch a:hover,
.nx-header .nx-language-switch a:hover {
  color: #f6f7fb;
  background: #202a39;
}
.nx-language-switch a[aria-current]:not([aria-current="false"]),
.nx-header .nx-language-switch a[aria-current]:not([aria-current="false"]) {
  color: #ffb078;
  background: #2a201c;
  border-color: #995e36;
}
.nx-header .nx-language-switch a:after { display: none; }
.nx-header-inner > .nx-language-switch { margin-left: 0; }
.nx-header-inner > br { display: none; }

.nx-language-prompt[hidden] { display: none !important; }
.nx-language-prompt {
  position: fixed;
  z-index: 900;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  box-sizing: border-box;
  width: 340px;
  max-width: calc(100vw - 40px);
  max-height: calc(100dvh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  border: 1px solid #5a4638;
  border-radius: 13px;
  background: #141b25;
  color: #f6f7fb;
  box-shadow: 0 10px 35px #0005;
  font-family: var(--nx-font, system-ui, sans-serif);
  line-height: 1.5;
  isolation: isolate;
}
.nx-language-prompt > p {
  margin: 0 0 2px;
  padding: 0;
  color: #f6f7fb;
  font: 600 16px/1.4 var(--nx-font, system-ui, sans-serif);
  letter-spacing: -.01em;
}
.nx-language-prompt [data-nx-language-accept],
.nx-language-prompt [data-nx-language-dismiss] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  margin: 0;
  cursor: pointer;
  font: 600 12px/1.4 var(--nx-font, system-ui, sans-serif);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
}
.nx-language-prompt [data-nx-language-accept] {
  background: #ef7d32;
  border-color: #ef7d32;
  color: #10141b;
}
.nx-language-prompt [data-nx-language-accept]:hover {
  background: #ff9c59;
  border-color: #ff9c59;
  color: #10141b;
}
.nx-language-prompt [data-nx-language-dismiss] {
  background: transparent;
  border-color: #596475;
  color: #c9d2df;
}
.nx-language-prompt [data-nx-language-dismiss]:hover {
  color: #fff;
  background: #202a39;
}
.nx-language-switch a:focus-visible,
.nx-language-prompt a:focus-visible,
.nx-language-prompt button:focus-visible {
  outline: 2px solid #ffb783 !important;
  outline-offset: 3px !important;
}

/* Reserve a little more navigation room for the two explicit language links. */
@media (min-width: 981px) and (max-width: 1180px) {
  .nx-header .nx-header-inner { gap: 18px; }
  .nx-header .nx-nav { gap: 17px; }
  .nx-header .nx-nav a { font-size: 12px; }
  .nx-header .nx-nav .nx-nav-cta { padding-inline: 14px; font-size: 11px; }
  .nx-header .nx-brand img { max-width: 135px; }
}
@media (max-width: 980px) {
  .nx-header .nx-header-inner { column-gap: 12px; }
  .nx-header-inner > .nx-brand { order: 0; }
  .nx-header-inner > .nx-language-switch { order: 1; margin-left: auto; }
  .nx-header.nx-menu-ready .nx-menu-toggle { order: 2; margin-left: 0; }
  .nx-header .nx-nav { order: 4; }
  .nx-language-switch a,
  .nx-header .nx-language-switch a { min-height: 36px; min-width: 35px; padding: 8px 7px; }
}
@media (max-width: 700px) {
  .nx-language-prompt {
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: 330px;
    max-width: calc(100vw - 24px);
    padding: 16px;
    gap: 8px;
    border-radius: 11px;
  }
  .nx-language-prompt > p { font-size: 15px; }
}
@media (max-width: 380px) {
  .nx-header .nx-header-inner { column-gap: 8px; }
  .nx-header .nx-brand img { max-width: 105px; }
  .nx-language-switch { padding: 2px; gap: 0; }
  .nx-header .nx-language-switch a { min-width: 33px; padding-inline: 6px; }
  .nx-header.nx-menu-ready .nx-menu-toggle { gap: 6px; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx-language-switch a,
  .nx-language-prompt a,
  .nx-language-prompt button { transition: none; }
}

/* Single-language policy pages retain every approved clause and a readable TOC. */
body.nx-design.nodex-content-page #main-content { background: var(--nx-bg) !important; color: var(--nx-text); }
body.nx-design .nx-legal-localized { max-width: 1180px; margin: 0 auto; padding-top: 65px; padding-bottom: 85px; }
body.nx-design .nx-legal-localized h1 { margin-bottom: 28px; }
body.nx-design .nx-legal-localized h2 { font-size: clamp(25px, 3vw, 36px); margin-top: 45px; }
body.nx-design .nx-legal-localized h3 { font-size: 23px; margin-top: 36px; }
body.nx-design .nx-legal-localized aside { padding: 24px; border: 1px solid var(--nx-border); border-radius: 12px; background: var(--nx-surface); margin: 35px 0; }
body.nx-design .nx-legal-localized aside ol { columns: 2; column-gap: 42px; }
body.nx-design .nx-legal-localized aside li { break-inside: avoid; padding-bottom: 7px; }
body.nx-design .nx-legal-localized .nodex-toc-title { font-weight: 650; color: var(--nx-text); margin-bottom: 18px; }
body.nx-design .nx-legal-localized .nodex-toc nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
body.nx-design .nx-legal-localized .nodex-toc nav a { display: block; line-height: 1.5; }
body.nx-design .nx-legal-localized section { scroll-margin-top: 125px; }
body.nx-design .nx-legal-localized table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 25px 0; font-size: 14px; }
body.nx-design .nx-legal-localized td, body.nx-design .nx-legal-localized th { padding: 14px; min-width: 145px; text-align: left; border: 1px solid var(--nx-border); background: transparent; }
body.nx-design .nx-legal-localized code { overflow-wrap: anywhere; color: inherit; font-size: .9em; }
body.nx-design .nx-legal-localized img { max-width: 100%; height: auto; }
@media (min-width: 981px) { body.nx-design.nodex-lang-bg .nx-nav { gap: 20px; } }
body.nx-design.nodex-lang-bg .nx-hero h1 { font-size: clamp(42px, 4.4vw, 70px); }
@media (max-width: 700px) {
 body.nx-design .nx-legal-localized aside ol { columns: 1; }
 body.nx-design .nx-legal-localized .nodex-toc nav { grid-template-columns: 1fr; }
 body.nx-design .nx-legal-localized { padding-top: 42px; }
 body.nx-design.nodex-lang-bg .nx-hero h1 { font-size: clamp(32px, 7.4vw, 50px); }
}
