.root {
  padding: 1px 12px;

  &-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding-right: 8px;
    border-radius: 6px;
  }

  &-link {
    height: 32px;
    text-decoration: none;
    font: inherit;
    color: inherit;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    flex-grow: 1;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 10px;
    display: flex;
    align-items: center;
  }

  &:hover &-inner {
    background: var(--alinea-highlight);
  }

  &.is-active &-inner {
    background: var(--alinea-selected);
    color: var(--alinea-selected-foreground);
  }
}

.langswitch {
  position: relative;
  background: var(--alinea-fields);
  box-shadow: var(--alinea-fields-shadow);
  border-radius: var(--alinea-border-radius);
  margin: 6px 0;
  margin-right: 10px;

  &-input {
    cursor: pointer;
    appearance: none;
    outline: none;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    padding: 4px 0;
    padding-left: 8px;

    &-label {
      font-size: 11px;
      line-height: 1.5;
      font-weight: bold;
      text-transform: uppercase;
      flex: 1 0 auto;
      margin-right: 4px;

      &.is-placeholder {
        color: #9fa6b2;
      }
    }

    &-icon {
      flex: 0 0 auto;
      color: #9fa6b2;
      font-size: 18px;
    }
  }

  &-dropdown {
    position: absolute;
    list-style: none;
    margin: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1;
    border-radius: var(--alinea-border-radius);
    background: var(--alinea-background);
    border: 1px solid var(--alinea-outline);
    box-shadow: 0 2px 10px var(--alinea-shadow);
    outline: none;
    margin-top: 2px;

    &-inner {
      padding: 4px;
    }

    &-option {
      cursor: pointer;
      position: relative;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      padding: 6px 8px;
      border-radius: var(--alinea-border-radius);

      &.is-active {
        background: var(--alinea-highlight);
      }

      &.is-selected {
        font-weight: 600;
      }

      &-icon {
        width: 24px;

        .is-selected & {
          color: var(--alinea-accent);
        }
      }
    }
  }
}
