/* Language switcher for the HKFA one-pager (English / 中文). */
.header-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-tools .header-book {
  justify-self: unset;
}

.lang-switcher {
  display: inline-flex;
  align-items: stretch;
  flex: 0 0 auto;
  border: 1px solid #cbd3c5;
  border-radius: 7px;
  overflow: hidden;
  background: #fffdf6;
  font-size: .78rem;
  font-weight: 740;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
}

.lang-switcher a:hover {
  background: #e9eddb;
}

.lang-switcher a.is-current,
.lang-switcher a[aria-current="page"] {
  background: var(--forest);
  color: #faf9ef;
}

.lang-switcher a.is-current:hover,
.lang-switcher a[aria-current="page"]:hover {
  background: #315341;
  color: #faf9ef;
}

.lang-switcher-footer {
  background: #163226;
  border-color: #ffffff2b;
}

.lang-switcher-footer a {
  color: #e8eee4;
  min-height: 32px;
  padding: 0 9px;
}

.lang-switcher-footer a:hover {
  background: #25503b;
}

.lang-switcher-footer a.is-current,
.lang-switcher-footer a[aria-current="page"] {
  background: #faf9ef;
  color: var(--forest-dark);
}

.lang-switcher-footer a.is-current:hover,
.lang-switcher-footer a[aria-current="page"]:hover {
  background: #faf9ef;
  color: var(--forest-dark);
}

.footer-bottom {
  align-items: center;
  gap: 12px 20px;
}

@media (max-width: 859px) {
  .lang-switcher a {
    min-height: 34px;
    padding: 0 8px;
  }
}

@media (max-width: 519px) {
  /* Keep the switcher visible next to the menu button when WhatsApp hides. */
  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
  .header-tools .header-book {
    display: none;
  }
  .lang-switcher {
    font-size: .72rem;
  }
  .lang-switcher a {
    min-height: 32px;
    padding: 0 7px;
  }
}

@media (max-width: 359px) {
  .lang-switcher a {
    padding: 0 6px;
  }
}