/* Header language switcher (EN / VI) — partials/components/lang-switcher.php */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  line-height: 1.2;
  user-select: none;
}

.lang-switch_icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: block;
  opacity: 0.5;
}

/* Links are 44px tall for touch; the negative margin keeps the header row at its original height. */
.lang-switch_list {
  display: flex;
  align-items: center;
  margin: -1rem 0;
  padding: 0;
  list-style: none;
}

.lang-switch_item {
  display: flex;
  align-items: center;
}

.lang-switch_item + .lang-switch_item::before {
  content: "/";
  opacity: 0.35;
}

.lang-switch_link {
  display: inline-flex;
  align-items: center;
  min-height: 4.4rem;
  padding: 0 0.6rem;
  color: inherit;
  opacity: 0.5;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: opacity 0.3s ease-in-out;
}

.lang-switch_link.is-active {
  opacity: 1;
  cursor: default;
}

.lang-switch_link:focus-visible {
  opacity: 1;
  outline: 1px solid currentColor;
  outline-offset: -0.8rem;
}

@media (hover: hover) {
  .lang-switch_link:hover {
    opacity: 1;
  }
}

/* Static header bar (dark navy background) */
.lang-switch--bar {
  color: #fff;
  font-size: 1.8rem;
}

.lang-switch--bar .lang-switch_icon {
  width: 2.2rem;
  height: 2.2rem;
}

/* Beside MENU / search: follows the colour the header script sets per section */
.lang-switch--fixed {
  color: rgba(var(--nav-color), 1);
  font-size: 1.4rem;
  margin-right: 0.6rem;
  transition: color 0.4s ease-in-out;
}

@media screen and (min-width: 1201px) {
  .lang-switch--fixed {
    font-size: 1.6rem;
  }
}

@media screen and (max-width: 1200px) {
  .lang-switch--bar {
    display: none;
  }
}

@media screen and (max-width: 400px) {
  .lang-switch--fixed .lang-switch_icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switch_link,
  .lang-switch--fixed {
    transition: none;
  }
}
