/* ============================================================
   BEATCONFUSED I18N WIDGET — the fixed top-right language switcher.
   Self-contained (doesn't rely on any page's own :root custom
   properties, since their exact values differ slightly page to page)
   but colour-matched to the site's shared parchment/brass palette.
   ============================================================ */
.bc-lang-switch {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 999;
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  background: rgba(255, 251, 244, 0.92);
  border: 1px solid rgba(62, 45, 30, 0.28);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(34, 27, 22, 0.14);
  backdrop-filter: blur(6px);
}

.bc-lang-btn {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: transparent;
  color: #57483b;
  font-family: Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  transition: transform 100ms ease, background 100ms ease, border-color 100ms ease, color 100ms ease;
}

.bc-lang-btn:hover {
  background: rgba(178, 122, 55, 0.14);
}

.bc-lang-btn.is-active {
  background: linear-gradient(140deg, #b67a35, #8d5524);
  border-color: rgba(115, 68, 29, 0.7);
  color: #fffdf7;
  transform: translateY(-1px);
}

.bc-lang-btn:focus-visible {
  outline: 2px solid rgba(163, 86, 34, 0.9);
  outline-offset: 2px;
}

.bc-lang-flag {
  display: inline-flex;
  flex: none;
  width: 1.35rem;
  height: 0.9rem;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(60, 40, 20, 0.25);
  line-height: 1;
}

.bc-lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 480px) {
  .bc-lang-switch {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.24rem;
    gap: 0.2rem;
  }

  .bc-lang-btn {
    padding: 0.24rem 0.42rem;
    font-size: 0.66rem;
  }

  .bc-lang-flag {
    width: 1.15rem;
    height: 0.77rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bc-lang-btn {
    transition: none;
  }
}
