/*

######################################
### MOLECULES: language-selector #####
######################################

*/

@import '_extends.scss';
@import '_functions.scss';
@import '_mixins.scss';
@import '_variables.scss';

@import 'components/atoms/_text.scss';

.#{molecule('language-selector')} {
  position: relative;
  margin-right: 20px;
  padding-bottom: 10px;
  display: none;

  @media (max-width: $minDeviceWidth) {
    margin-right: 0;
  }

  @media (min-width: 1024px) {
    margin-right: 0;
    padding-right: 30px;
    display: block;
  }

  &-label {
    display: flex;
    align-items: center;
    font-size: 11px;
    border: none;
    background: none;

    &:hover {
      color: color('blue-ribbon');
    }
  }

  &-toggle {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    -webkit-appearance: none;

    @media (min-width: 1024px) {
      width: calc(100% - 30px);
    }
  }

  &-icon {
    width: 10px;
    height: 10px;
    margin-left: 5px;
  }

  &-list {
    list-style: none;
    display: none;
    position: absolute;
    right: 15%;
    margin: 0;
    padding: 2px 8px;
    background: color('white');
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.07);

    @media (max-width: $minDeviceWidth) {
      overflow: auto;
      max-height: calc(100vh - #{$mobileHeaderHeight} - #{$bannerHeight});
    }
  }

    .ap-m-nav-link {
      display: block;
    }

  /* For when the selector is active */
  &-toggle:hover ~ &-list,
  &-toggle:checked ~ &-list,
  &-list:hover {
      display: block;
  }

  &-list:focus-within {
      display: block;
  }

  .mainmenuopen & {
    display: block;
  }
}
