@use "uswds-core" as *;

.usa-language__link[aria-expanded="true"] {
  color: #112f4e;
}

.usa-language__submenu {
  background-color: #112f4e;
  text-align: start;
  border: units(2px) solid #112f4e;
}

.usa-language__submenu-item {
  border: 0;

  a {
    padding: 0.55rem;
    margin-bottom: 0.5rem;
  }

  [lang] {
    unicode-bidi: isolate;
  }

  &:last-of-type a {
    margin-bottom: 0;
  }

  a:focus {
    @include focus-outline(null, null, "white", null);
  }
}

.usa-language__primary-item:last-of-type .usa-language__submenu {
  inset-inline: auto 0;
  margin-top: 1px;
  max-height: 290px; /* scroll after 6 items */
  overflow: auto;
}
