/* ============================================================
   Language switcher dropdown
   Add this to your existing CSS file (e.g. appc479.css).
   Tweak the CSS variables at the top to match your brand.
   ============================================================ */

.wsn-lang-switcher {
  /* Override these from a parent rule to retheme. */
  --lang-accent:   #68a0ff;                          /* brand gold #CDB560; */
  --lang-text:     #ffffff;
  --lang-border:   rgba(255, 255, 255, 0.18);
  --lang-menu-bg:  #1B1E22;                          /* dark menu */
  --lang-menu-fg:  #ffffff;
  --lang-hover-bg: rgba(205, 181, 96, 0.10);

  position: relative;
  display: inline-block;
  margin-right: 12px;
  font-family: inherit;
}

/* ---------- Trigger button ---------- */

.wsn-lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--lang-border);
  border-radius: 8px;
  color: var(--lang-text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.wsn-lang-button:hover,
.wsn-lang-button:focus-visible {
  border-color: var(--lang-accent);
  color: var(--lang-accent);
  outline: none;
}

.wsn-lang-button[aria-expanded="true"] {
  border-color: var(--lang-accent);
  color: var(--lang-accent);
}

.wsn-lang-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--lang-accent) ;
}

.wsn-lang-current {
  letter-spacing: 0.02em;
}

.wsn-lang-caret {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.wsn-lang-button[aria-expanded="true"] .wsn-lang-caret {
  transform: rotate(180deg);
}

/* ---------- Menu ---------- */

.wsn-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--lang-menu-bg);
  border: 1px solid var(--lang-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 1000;
  animation: wsn-lang-fade 0.15s ease-out;
}

.wsn-lang-menu[hidden] {
  display: none;
}

@keyframes wsn-lang-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Options ---------- */

.wsn-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  color: var(--lang-menu-fg);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.wsn-lang-option:hover,
.wsn-lang-option:focus-visible {
  background: var(--lang-hover-bg);
  outline: none;
}

.wsn-lang-option[aria-selected="true"] {
  color: var(--lang-accent);
}

.wsn-lang-check-wrap {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
}

.wsn-lang-check {
  width: 14px;
  height: 14px;
}

/* ---------- Mobile menu placement ---------- */
/* When inside the mobile dropdown, anchor the menu to the left
   so it doesn't get clipped by the panel edge. */
.wsn-mobile-buttons .wsn-lang-menu,
.wsn-mobile-content .wsn-lang-menu {
  right: auto;
  left: 0;
}
