lego-icon {
  width: auto;
  height: auto;

  > * {
    display: inline-block;
    line-height: 100%;
    vertical-align: middle;
    width: inherit;
    height: inherit;

    svg {
      fill: currentColor;
      width: inherit;
      height: inherit;

      * {
        pointer-events: none;
      }
    }

    svg:hover *[data-hover-behavior=color] {
      fill: currentColor;
    }

    svg:hover *[data-hover-behavior=white] {
      fill: white;
    }
  }
}

// Media queries to address microsoft high contrast mode.
@media screen and (-ms-high-contrast: active) {
  .ands-icon svg .whiteBackground {
    fill: none;
  }
}

@media screen and (-ms-high-contrast: black-on-white) {
  .ands-icon svg .whiteBackground {
    fill: white;
  }
}

@media screen and (-ms-high-contrast: white-on-black) {
  .ands-icon svg .whiteBackground {
    fill: black;
  }
}
