/* stylelint-disable no-descending-specificity */
.ds-navigation-link {
  align-items: center;
  display: inline-flex;
  font-family: var(--ds-type-system-sans-lining);
  font-size: var(--ds-type-scale-1);
  font-weight: 400;
  line-height: var(--ds-type-leading-border-link);
  text-decoration: none;
  span {
    border-bottom: 0.125rem solid transparent;
    color: var(--ds-color-london-5);
    transition: all var(--ds-interactions-transition);
    will-change: border-color, color;
  }
  &:hover {
    span {
      border-bottom-color: var(--ds-color-chicago-30);
      color: var(--ds-color-chicago-30);
    }
  }
  &:focus {
    outline: solid transparent;
    span {
      box-shadow: 0 0 0 0.125rem var(--ds-color-hong-kong-55);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
      box-shadow: none;
      color: var(--ds-color-london-5);
    }
  }
  &.is-selected {
    font-weight: 700;
  }
  br {
    flex: 0;
  }
}

.ds-navigation-link--selected {
  font-weight: 700;
}

.ds-navigation-link--inverse {
  span {
    color: var(--ds-color-london-100);
  }
  &:hover {
    span {
      border-bottom-color: var(--ds-color-london-85);
      color: var(--ds-color-london-85);
    }
  }
  &:active {
    span {
      border-bottom-color: var(--ds-color-hong-kong-55);
      color: var(--ds-color-london-100);
    }
  }
  &.ds-navigation-link--secondary {
    font-size: var(--ds-type-scale-0);
    span {
      border-bottom-width: 0.0625rem;
      color: var(--ds-color-london-85);
    }
    &:hover {
      span {
        border-bottom-color: var(--ds-color-london-95);
        color: var(--ds-color-london-95);
      }
    }
    &:focus {
      span {
        box-shadow: 0 0 0 0.0625rem var(--ds-color-hong-kong-55);
      }
    }
    &:active {
      span {
        border-bottom-color: var(--ds-color-hong-kong-55);
        box-shadow: none;
        color: var(--ds-color-london-85);
      }
    }
    &.ds-navigation-link--major {
      font-weight: 700;
      span {
        color: var(--ds-color-london-100);
      }
      &:hover {
        color: var(--ds-color-london-85);
        span {
          border-bottom-color: var(--ds-color-london-85);
        }
      }
      &:active {
        color: var(--ds-color-london-100);
        span {
          border-bottom-color: var(--ds-color-hong-kong-55);
        }
      }
    }
  }
  &.ds-navigation-link--minor {
    font-size: var(--ds-type-scale--1);
    span {
      color: var(--ds-color-london-70);
    }
    &:hover {
      span {
        border-bottom-color: var(--ds-color-london-85);
        color: var(--ds-color-london-85);
      }
    }
    &:active {
      span {
        border-bottom-color: var(--ds-color-hong-kong-55);
        color: var(--ds-color-london-70);
      }
    }
  }
}

.ds-navigation-link--icon {
  span {
    margin: 0.125rem 0 0 0;
  }
  &::before {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    content: '';
    height: 1.5rem;
    margin: 0 0.5rem 0 0;
    width: 1.5rem;
  }
  &.ds-navigation-link--icon-account {
    &::before {
      background-image: url('eds://common/static/images/icons/material-account.svg');
    }
  }
  &.ds-navigation-link--icon-search {
    &::before {
      background-image: url('eds://common/static/images/icons/material-search.svg');
    }
  }
  &.ds-navigation-link--icon-search.ds-navigation-link--inverse {
    &::before {
      background-image: url('eds://common/static/images/icons/material-search--inverse.svg');
    }
  }
  &.ds-navigation-link--secondary {
    &::before {
      height: 1.25rem;
      margin-right: 0.375rem;
      width: 1.25rem;
    }
  }
  &.ds-navigation-link--minor {
    &::before {
      height: 1rem;
      margin-right: 0.375rem;
      width: 1rem;
    }
  }
}
