/* Custom site-wide language switcher (matches the library's selector).
   Themed to the main site's warm palette, with light + dark variants. */
.lang-switch { position: relative; display: inline-block; }

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1.5px solid rgba(166, 124, 91, 0.3);
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  color: #7A4A2E;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
  transition: border-color 0.2s, color 0.2s;
}
.lang-switch__btn:hover,
.lang-switch.open .lang-switch__btn { border-color: #FF8732; color: #FF8732; }

.lang-switch__chevron { opacity: 0.7; transition: transform 0.2s; }
.lang-switch.open .lang-switch__chevron { transform: rotate(180deg); }

.lang-switch__menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 1000;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #FFF8F0;
  border: 1px solid rgba(166, 124, 91, 0.3);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
.lang-switch.open .lang-switch__menu { display: block; }

.lang-switch__item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  color: #502314;
  transition: background-color 0.15s, color 0.15s;
}
.lang-switch__item:hover { background: rgba(255, 135, 50, 0.12); color: #FF8732; }
.lang-switch__item.active { color: #FF8732; }

.lang-switch__code {
  min-width: 24px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #A67C5B;
}
.lang-switch__item:hover .lang-switch__code,
.lang-switch__item.active .lang-switch__code { color: inherit; }

.lang-switch__name { font-size: 0.85rem; font-weight: 500; }

/* Dark theme (html.dark, matching the main site's toggle) */
html.dark .lang-switch__btn { color: #D4B896; border-color: rgba(61, 46, 36, 0.6); }
html.dark .lang-switch__btn:hover,
html.dark .lang-switch.open .lang-switch__btn { border-color: #FF8732; color: #FF8732; }
html.dark .lang-switch__menu { background: #241c18; border-color: rgba(61, 46, 36, 0.8); }
html.dark .lang-switch__item { color: #F5EBDC; }
html.dark .lang-switch__item:hover { background: rgba(255, 135, 50, 0.16); color: #FF8732; }
html.dark .lang-switch__code { color: #A67C5B; }
