/* The language switcher on the tool pages (map, flash, flash-classic, help,
   logs). They carry their own inline CSS and do not load main.css, so the
   switcher is styled here with their variables. */
.lang-menu { position: relative; flex-shrink: 0; }
.lang-menu > summary {
  list-style: none; cursor: pointer;
  font-size: 0.8rem; font-weight: 600; line-height: 1.2;
  padding: 4px 10px; border-radius: 6px;
  background: var(--color-bg-code, #f3efe8); color: var(--color-text-secondary, #57514a);
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary:hover, .lang-menu[open] > summary { background: var(--color-border, #e4dfd6); }
.lang-menu__list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 1000;
  margin: 0; padding: 6px; list-style: none;
  min-width: 11rem; max-width: calc(100vw - 32px); max-height: min(70vh, 26rem); overflow-y: auto;
  background: var(--color-bg, #fff); border: 1px solid var(--color-border, #e4dfd6);
  border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.lang-menu__list a {
  display: block; padding: 9px 12px; border-radius: 6px; white-space: nowrap;
  font-size: 0.9375rem; line-height: 1.3; text-decoration: none;
  color: var(--color-text-secondary, #57514a);
}
.lang-menu__list a:hover, .lang-menu__list a:focus-visible { background: var(--color-bg-code, #f3efe8); color: var(--color-primary-dark, #1a7f4b); }
.lang-menu__list a[aria-current="true"] { font-weight: 700; color: var(--color-text, #1f1b16); }
@media (max-width: 480px) {
  .lang-menu > summary { font-size: 0; padding: 7px 10px; }
  .lang-menu > summary::before {
    content: ""; display: block; width: 16px; height: 14px; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2c3 3 3 17 0 20M12 2c-3 3-3 17 0 20'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2c3 3 3 17 0 20M12 2c-3 3-3 17 0 20'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}
