/* Shared EN/VI pill — Library route switch + Structure content lang (same look) */

.lang-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
  min-width: 0;
  height: auto;
  padding: 2px 5px;
  box-sizing: border-box;
  border: 1px solid var(--k-line, #0e3752);
  border-radius: 3px;
  background: var(--k-deep, #000b13);
  color: var(--k-t3, #7f8b92);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.05em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

/* VI & EN active: brand blue #346ce8 matching main icons */
.lang-pill-vi.active,
.lang-pill-en.active,
.lang-pill.active {
  color: var(--k-link, #346ce8);
  border-color: var(--k-link, #346ce8);
  background: rgba(52, 108, 232, 0.14);
}

button.lang-pill {
  margin: 0;
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

button.lang-pill:hover:not(.active) {
  color: var(--k-t2, #cbd3d8);
  border-color: var(--k-line, #0e3752);
}

button.lang-pill:focus-visible {
  outline: 2px solid var(--k-link, #346ce8);
  outline-offset: 1px;
}

@media (max-width: 767px) {
  .lang-pill {
    font-size: 9px;
    letter-spacing: 0.04em;
  }
}

/* Library: one pill = current language (active); tap the link to switch */
.lang-switch-group,
.ol-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lib-actions .language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.language-switch .lang-pill {
  pointer-events: none;
}

.lib-actions .language-switch:hover {
  background: rgba(52, 108, 232, 0.12);
  border-radius: 4px;
}

@media (max-width: 640px) {
  .lib-actions .language-switch {
    min-height: 33px;
    min-width: 33px;
  }
}

/* Phone: fixed under header. Desktop: .k-lang-header in .k-actions (left of market status). Both hidden; moved to Profile menu. */
.k-lang-header,
.k-lang-fixed,
#kLangHeader,
#kLangFixed {
  display: none !important;
}
