/* Flag-only language control, with readable language names in its dropdown. */
.avm-language-switcher {
  position: relative;
  display: inline-block;
  margin-left: 4px;
  z-index: 5;
}
.avm-language-trigger {
  min-width: 49px;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(7,63,97,.13);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  cursor: pointer;
  list-style: none;
}
.avm-language-trigger::-webkit-details-marker { display: none; }
.avm-language-trigger:hover, .avm-language-switcher[open] .avm-language-trigger {
  border-color: rgba(7,63,97,.28);
  background: #eff7fa;
}
.avm-language-trigger:focus-visible, .avm-language-option:focus-visible {
  outline: 2px solid var(--avm-orange);
  outline-offset: 3px;
}
.avm-language-flag { display: block; width: 22px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(7,63,97,.08); }
.avm-language-flag-fallback { font-size: 20px; line-height: 1; }
.avm-language-chevron { width: 7px; height: 7px; border-right: 1.5px solid var(--avm-navy); border-bottom: 1.5px solid var(--avm-navy); transform: translateY(-2px) rotate(45deg); }
.avm-language-switcher[open] .avm-language-chevron { transform: translateY(2px) rotate(225deg); }
.avm-language-trigger::after {
  position: absolute; top: calc(100% + 8px); right: 0;
  content: attr(data-tooltip); padding: 5px 9px;
  border-radius: 7px; background: var(--avm-navy-deep); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.avm-language-switcher:not([open]) .avm-language-trigger:hover::after,
.avm-language-switcher:not([open]) .avm-language-trigger:focus-visible::after { opacity: 1; }
.avm-language-switcher .avm-language-menu,
.avm-primary-navigation .avm-language-switcher .avm-language-menu {
  position: absolute; top: calc(100% + 9px); right: 0;
  display: block; width: max-content; min-width: 180px;
  margin: 0; padding: 7px;
  border: 1px solid rgba(7,63,97,.11); border-radius: 15px;
  background: #fff; box-shadow: 0 16px 32px rgba(5,46,74,.16);
  list-style: none;
}
.avm-language-switcher:not([open]) > .avm-language-menu { display: none; }
.avm-language-menu li { margin: 0; }
.avm-language-switcher .avm-language-option,
.avm-primary-navigation .avm-language-switcher .avm-language-option,
.avm-footer-languages .avm-language-switcher .avm-language-option {
  min-height: 41px; display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border: 0; border-radius: 9px;
  color: var(--avm-navy); background: transparent;
  font-size: 13px; font-weight: 650; line-height: 1.2;
  text-transform: none; white-space: nowrap;
}
.avm-language-switcher .avm-language-option:hover,
.avm-language-switcher .avm-language-option.is-active { color: var(--avm-navy); background: #eaf5f9; }
.avm-footer-languages .avm-language-switcher .avm-language-menu { top: auto; bottom: calc(100% + 9px); left: 0; right: auto; }
.avm-footer-languages .avm-language-trigger::after { top: auto; bottom: calc(100% + 8px); right: auto; left: 0; }

@media (max-width: 940px) {
  .avm-primary-navigation .avm-language-switcher { display: inline-block; margin: 0; }
  .avm-primary-navigation .avm-language-switcher .avm-language-menu {
    position: static; width: min(100%, 240px); margin: 9px 0 0;
    box-shadow: 0 10px 22px rgba(5,46,74,.09);
  }
  .avm-primary-navigation .avm-language-option::after { display: none; }
  .avm-language-trigger::after { display: none; }
}
