/* The language button (templates/_language_picker.html, portal/docs/localisation.md).

   Styled only through the role tokens of portal/docs/themes-tokens.md, like the Theme
   button above it, so every theme restyles it by re-pointing those; a theme stylesheet
   loads after this one and may override any rule here under its own scope. */

.lang-picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin: 10px 0 0; padding: 8px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-primary);
}
.lang-picker-label { display: inline-flex; align-items: center; gap: 7px;
                     font-size: 13px; font-weight: 700; min-width: 0; }
.lang-picker-label .ico { font-size: 17px; line-height: 1; }
.lang-picker-options { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; min-width: 0; }
.lang-option {
  font: inherit; font-size: 12px; line-height: 1.2;
  padding: 5px 9px; min-height: 28px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--border);
  background: transparent; color: var(--text-secondary, var(--text-primary));
  cursor: pointer; white-space: nowrap;
}
.lang-option:hover:not(:disabled) { border-color: var(--accent); color: var(--text-primary); }
.lang-option.current { border-color: var(--accent); color: var(--text-primary); font-weight: 700;
                       background: var(--surface-popover); }
.lang-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-option:disabled { cursor: not-allowed; opacity: .7; }
.lang-locked { flex-basis: 100%; font-size: 11px; color: var(--warning); }
body.viewer-open .lang-picker { visibility: hidden; }

/* The sign-in page has no sidebar: the button sits under the form, centred. */
.login-lang .lang-picker { justify-content: center; margin-top: 18px; }
.login-lang .lang-picker-options { margin-left: 0; }
