/* ─────────────────────────────────────────────────────────────────────
 * Language switcher — front-end styles.
 * Scoped under .brpegy-langsw, brutalist defaults that respect the
 * RPEGY token palette. Themes can fully override.
 * ───────────────────────────────────────────────────────────────────── */

[x-cloak] {
  display: none !important;
}

.brpegy-langsw {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
}

.brpegy-langsw__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid currentColor;
  color: rgb(30 100 50); /* RPE green */
  text-decoration: none;
  transition:
    background 0.12s,
    color 0.12s;
}
.brpegy-langsw__item:hover {
  background: rgb(30 100 50);
  color: #fff;
}
.brpegy-langsw__item.is-current {
  background: rgb(30 100 50);
  color: #fff;
  pointer-events: none;
}

.brpegy-langsw__flag {
  font-size: 1.1em;
  line-height: 1;
}

.brpegy-langsw--inline {
  gap: 12px;
}
.brpegy-langsw--inline .brpegy-langsw__item {
  border: 0;
  padding: 0;
}
.brpegy-langsw--inline .brpegy-langsw__item.is-current {
  background: transparent;
  color: rgb(219 176 0); /* RPE gold for active in inline mode */
  font-weight: 700;
}

/* Dropdown variant (uses Alpine for open/close). */
.brpegy-langsw--dropdown {
  position: relative;
  display: inline-block;
}
.brpegy-langsw__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid rgb(30 100 50);
  color: rgb(30 100 50);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}
.brpegy-langsw__menu {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-start: 0;
  min-width: 140px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid rgb(30 100 50);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
}
.brpegy-langsw__menu .brpegy-langsw__item {
  border: 0;
  padding: 8px 12px;
  width: 100%;
}
