/* Compact trigger with a small, theme-aware disclosure panel. */
#tmSiteHeader .tm-language-picker {
  --language-ink: #252031;
  --language-muted: #63596e;
  --language-surface: #fff;
  --language-edge: #e9e2ef;
  --language-highlight: #f4eefb;
  --language-accent: #713eb8;
  --language-shadow: #26163d22;
  position: relative;
  flex: none;
  color: var(--language-ink);
  color-scheme: light;
  direction: ltr;
}

#tmSiteHeader:is([data-language-theme="dark"], .tm-secondary-header) .tm-language-picker {
  --language-ink: #f8f1ff;
  --language-muted: #c3b5ce;
  --language-surface: #1d1a28;
  --language-edge: #ffffff1b;
  --language-highlight: #332746;
  --language-accent: #d3a7ff;
  --language-shadow: #07060e70;
  color-scheme: dark;
}

#tmSiteHeader .tm-language-picker select {
  min-height: 36px;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 600 10px/1.2 "Montserrat", "Cairo", Arial, sans-serif;
}
#tmSiteHeader .tm-language-picker option { background: var(--language-surface); }

#tmSiteHeader .tm-language-picker [hidden] { display: none !important; }

#tmSiteHeader .tm-language-picker :is(.tm-language-trigger,.tm-language-option) {
  margin: 0;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-family: "Montserrat", "Cairo", Arial, sans-serif;
  text-transform: none;
  text-align: left;
  cursor: pointer;
}

#tmSiteHeader .tm-language-picker .tm-language-trigger {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  padding: 0 2px;
  border-radius: 6px;
  font-size: 9px !important;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

#tmSiteHeader .tm-language-chevron {
  width: 7px;
  height: 7px;
  flex: none;
  transition: transform .18s ease;
}

#tmSiteHeader .tm-language-trigger[aria-expanded="true"] .tm-language-chevron {
  transform: rotate(180deg);
}

#tmSiteHeader .tm-language-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  gap: 2px;
  width: 120px;
  padding: 4px;
  border: 1px solid var(--language-edge);
  border-radius: 10px;
  background: var(--language-surface);
  box-shadow: 0 10px 26px var(--language-shadow);
  animation: tm-language-open .16s ease-out;
}

#tmSiteHeader .tm-language-picker .tm-language-option {
  display: grid;
  grid-template-columns: 15px minmax(0,1fr) 9px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 9px !important;
  font-weight: 650;
  line-height: 1.2;
}

#tmSiteHeader .tm-language-option > :first-child {
  color: var(--language-muted);
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .06em;
}

#tmSiteHeader .tm-language-picker .tm-language-option:is(:hover,[aria-pressed="true"]) {
  background: var(--language-highlight);
}

#tmSiteHeader .tm-language-option svg { visibility: hidden; width: 9px; height: 9px; }
#tmSiteHeader .tm-language-option[aria-pressed="true"] svg { visibility: visible; color: var(--language-accent); }

#tmSiteHeader .tm-language-picker :is(select,button):focus-visible {
  outline: 2px solid var(--language-accent);
  outline-offset: -2px;
}

@keyframes tm-language-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #tmSiteHeader .tm-language-list { animation: none; }
  #tmSiteHeader .tm-language-chevron { transition: none; }
}

