/* RoamWell — Language switcher component
   Activated by placing <div data-lang-switcher></div> anywhere on the page.
   Adding a new language: edit LANGUAGES array in /lang-switcher.js — all pages
   automatically pick it up. No HTML changes required across pages. */

.lang-switcher {
  position: relative;
  display: inline-block;
  font-family: inherit;
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid rgba(16, 35, 74, .15);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: inherit;
  line-height: 1;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}
.lang-switcher__toggle:hover {
  background: rgba(16, 35, 74, .04);
  border-color: rgba(16, 35, 74, .25);
}
.lang-switcher__toggle[aria-expanded="true"] {
  background: rgba(16, 35, 74, .07);
  border-color: rgba(16, 35, 74, .3);
}
.lang-switcher__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.lang-switcher__caret {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  transition: transform .15s ease;
}
.lang-switcher__toggle[aria-expanded="true"] .lang-switcher__caret {
  transform: rotate(180deg);
}
.lang-switcher__label {
  font-weight: 500;
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(10, 18, 36, .18), 0 2px 6px rgba(10, 18, 36, .08);
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 100;
  border: 1px solid rgba(16, 35, 74, .08);
}
.lang-switcher__menu[hidden] { display: none; }

.lang-switcher__menu li { margin: 0; padding: 0; }

.lang-switcher__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #1a1a1a;
  text-decoration: none;
  transition: background .1s ease;
}
.lang-switcher__menu a:hover { background: #f3f1e8; }
.lang-switcher__menu a.is-current {
  font-weight: 600;
  color: #10234a;
}
.lang-switcher__menu a.is-current::after {
  content: "✓";
  color: #10234a;
  font-size: 0.9rem;
  margin-left: 8px;
}

/* Mobile tweak: smaller padding inside crowded header */
@media (max-width: 640px) {
  .lang-switcher__toggle {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
  .lang-switcher__menu {
    right: 0;
    min-width: 150px;
  }
}
