/* AEC-4699: language switcher — plain CSS, independent of the site's
   purged Tailwind build so it works regardless of which utility classes
   survived the original export's purge step. */

.xlc-switcher {
  position: relative;
  color: inherit;
  font: inherit;
}

.xlc-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  list-style: none;
  color: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.6rem;
  border-radius: 0.25rem;
  border: 1px solid currentColor;
  opacity: 0.85;
  user-select: none;
}
.xlc-switcher__trigger:hover,
.xlc-switcher[open] > .xlc-switcher__trigger {
  opacity: 1;
}
.xlc-switcher__trigger::-webkit-details-marker {
  display: none;
}
.xlc-switcher__chevron {
  width: 8px;
  height: 6px;
  flex: none;
  transition: transform 150ms;
}
.xlc-switcher[open] .xlc-switcher__chevron {
  transform: rotate(180deg);
}

.xlc-switcher__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 60;
  min-width: 10rem;
  display: flex;
  flex-direction: column;
  padding: 0.35rem;
  border-radius: 0.375rem;
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.xlc-switcher__menu a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: inherit;
  text-decoration: none;
}
.xlc-switcher__menu a:hover {
  background: rgba(0, 0, 0, 0.06);
}
.xlc-switcher__menu a[aria-current="true"] {
  font-weight: 600;
}
.xlc-switcher__menu a .xlc-switcher__code {
  font-size: 0.75rem;
  opacity: 0.55;
}

/* Mobile panel variant sits inline in the slide-out menu, not a popover. */
.xlc-switcher--mobile {
  margin: 0.75rem 0 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.xlc-switcher--mobile .xlc-switcher__trigger {
  display: none;
}
.xlc-switcher--mobile .xlc-switcher__menu {
  position: static;
  box-shadow: none;
  background: transparent;
  color: inherit;
  padding: 0;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.xlc-switcher--mobile .xlc-switcher__menu a {
  padding: 0.3rem 0;
}
.xlc-switcher--mobile .xlc-switcher__menu a .xlc-switcher__code {
  opacity: 0.6;
}

/* Footer variant: plain inline text links, no disclosure. */
.xlc-footer-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-top: 0.75rem;
}
.xlc-footer-switcher a {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
}
.xlc-footer-switcher a:hover {
  opacity: 1;
  text-decoration: underline;
}
.xlc-footer-switcher a[aria-current="true"] {
  opacity: 1;
  font-weight: 600;
}

/* Keep the compact language menu above the hero in either header state. */
.xlc-contact-pair .xlc-switcher__menu {
  top: 100%;
  inset-inline-end: 0;
  min-width: 3.75rem;
  width: max-content;
  z-index: 70;
}
.xlc-contact-pair .xlc-switcher__menu a {
  display: block;
  color: #1a1a1a;
}
.xlc-contact-pair .xlc-switcher__menu a[aria-current="true"] {
  background: #efefef;
}
.xlc-contact-pair .xlc-switcher__menu a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

/* The mobile drawer clips overflow, so let the options expand within it. */
.xlc-contact-pair:has(.xlc-contact-mobile[open]) { align-items: flex-start; }
.xlc-contact-pair .xlc-contact-mobile .xlc-switcher__menu {
  position: static;
  margin-block-start: .25rem;
}
